aboutsummaryrefslogtreecommitdiff
path: root/hw/sensor/lsm303dlhc_mag.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/sensor/lsm303dlhc_mag.c')
-rw-r--r--hw/sensor/lsm303dlhc_mag.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/sensor/lsm303dlhc_mag.c b/hw/sensor/lsm303dlhc_mag.c
index 343ff98..f9e501d 100644
--- a/hw/sensor/lsm303dlhc_mag.c
+++ b/hw/sensor/lsm303dlhc_mag.c
@@ -530,12 +530,12 @@ static void lsm303dlhc_mag_initfn(Object *obj)
/*
* Set the virtual method pointers (bus state change, tx/rx, etc.).
*/
-static void lsm303dlhc_mag_class_init(ObjectClass *klass, void *data)
+static void lsm303dlhc_mag_class_init(ObjectClass *klass, const void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
I2CSlaveClass *k = I2C_SLAVE_CLASS(klass);
- dc->reset = lsm303dlhc_mag_reset;
+ device_class_set_legacy_reset(dc, lsm303dlhc_mag_reset);
dc->vmsd = &vmstate_lsm303dlhc_mag;
k->event = lsm303dlhc_mag_event;
k->recv = lsm303dlhc_mag_recv;