aboutsummaryrefslogtreecommitdiff
path: root/hw/arm/z2.c
diff options
context:
space:
mode:
authorAlastair D'Silva <alastair@d-silva.org>2016-12-27 14:59:29 +0000
committerPeter Maydell <peter.maydell@linaro.org>2016-12-27 14:59:29 +0000
commit9e41bade85ef338afd983c109368d1bbbe931f80 (patch)
tree2356fb69bf69a56f9b21f05945dc368f7c137284 /hw/arm/z2.c
parent8e953a658fa13b05bea67899a91d8b65f2b89f11 (diff)
downloadqemu-9e41bade85ef338afd983c109368d1bbbe931f80.zip
qemu-9e41bade85ef338afd983c109368d1bbbe931f80.tar.gz
qemu-9e41bade85ef338afd983c109368d1bbbe931f80.tar.bz2
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/z2.c')
-rw-r--r--hw/arm/z2.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/hw/arm/z2.c b/hw/arm/z2.c
index 68a92f3..b3a6bbd 100644
--- a/hw/arm/z2.c
+++ b/hw/arm/z2.c
@@ -263,12 +263,6 @@ static int aer915_recv(I2CSlave *slave)
return retval;
}
-static int aer915_init(I2CSlave *i2c)
-{
- /* Nothing to do. */
- return 0;
-}
-
static VMStateDescription vmstate_aer915_state = {
.name = "aer915",
.version_id = 1,
@@ -285,7 +279,6 @@ static void aer915_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
I2CSlaveClass *k = I2C_SLAVE_CLASS(klass);
- k->init = aer915_init;
k->event = aer915_event;
k->recv = aer915_recv;
k->send = aer915_send;