diff options
author | Alastair D'Silva <alastair@d-silva.org> | 2016-12-27 14:59:29 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-12-27 14:59:29 +0000 |
commit | 9e41bade85ef338afd983c109368d1bbbe931f80 (patch) | |
tree | 2356fb69bf69a56f9b21f05945dc368f7c137284 /hw/arm/tosa.c | |
parent | 8e953a658fa13b05bea67899a91d8b65f2b89f11 (diff) |
hw/i2c: Add a NULL check for i2c slave init callbacks
Add a NULL check for i2c slave init callbacks, so that we no longer
need to implement empty init functions.
Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
Message-id: 20161202054617.6749-4-alastair@au1.ibm.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
[PMM: squashed in later tweak from Alistair to if() phrasing]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm/tosa.c')
-rw-r--r-- | hw/arm/tosa.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/hw/arm/tosa.c b/hw/arm/tosa.c index 1ee12f49b3..39d9dbbae6 100644 --- a/hw/arm/tosa.c +++ b/hw/arm/tosa.c @@ -202,12 +202,6 @@ static int tosa_dac_recv(I2CSlave *s) return -1; } -static int tosa_dac_init(I2CSlave *i2c) -{ - /* Nothing to do. */ - return 0; -} - static void tosa_tg_init(PXA2xxState *cpu) { I2CBus *bus = pxa2xx_i2c_bus(cpu->i2c[0]); @@ -275,7 +269,6 @@ static void tosa_dac_class_init(ObjectClass *klass, void *data) { I2CSlaveClass *k = I2C_SLAVE_CLASS(klass); - k->init = tosa_dac_init; k->event = tosa_dac_event; k->recv = tosa_dac_recv; k->send = tosa_dac_send; |