diff options
Diffstat (limited to 'hw/input')
-rw-r--r-- | hw/input/Makefile.objs | 6 | ||||
-rw-r--r-- | hw/input/lm832x.c | 9 |
2 files changed, 7 insertions, 8 deletions
diff --git a/hw/input/Makefile.objs b/hw/input/Makefile.objs index 77e53e6..c8b00f7 100644 --- a/hw/input/Makefile.objs +++ b/hw/input/Makefile.objs @@ -7,10 +7,10 @@ common-obj-y += ps2.o common-obj-$(CONFIG_STELLARIS_INPUT) += stellaris_input.o common-obj-$(CONFIG_TSC2005) += tsc2005.o -common-obj-$(CONFIG_VIRTIO) += virtio-input.o -common-obj-$(CONFIG_VIRTIO) += virtio-input-hid.o +common-obj-$(CONFIG_VIRTIO_INPUT) += virtio-input.o +common-obj-$(CONFIG_VIRTIO_INPUT) += virtio-input-hid.o ifeq ($(CONFIG_LINUX),y) -common-obj-$(CONFIG_VIRTIO) += virtio-input-host.o +common-obj-$(CONFIG_VIRTIO_INPUT) += virtio-input-host.o endif obj-$(CONFIG_MILKYMIST) += milkymist-softusb.o diff --git a/hw/input/lm832x.c b/hw/input/lm832x.c index d399531..74da30d 100644 --- a/hw/input/lm832x.c +++ b/hw/input/lm832x.c @@ -464,20 +464,19 @@ static const VMStateDescription vmstate_lm_kbd = { }; -static int lm8323_init(I2CSlave *i2c) +static void lm8323_realize(DeviceState *dev, Error **errp) { - LM823KbdState *s = LM8323(i2c); + LM823KbdState *s = LM8323(dev); s->model = 0x8323; s->pwm.tm[0] = timer_new_ns(QEMU_CLOCK_VIRTUAL, lm_kbd_pwm0_tick, s); s->pwm.tm[1] = timer_new_ns(QEMU_CLOCK_VIRTUAL, lm_kbd_pwm1_tick, s); s->pwm.tm[2] = timer_new_ns(QEMU_CLOCK_VIRTUAL, lm_kbd_pwm2_tick, s); - qdev_init_gpio_out(DEVICE(i2c), &s->nirq, 1); + qdev_init_gpio_out(dev, &s->nirq, 1); lm_kbd_reset(s); qemu_register_reset((void *) lm_kbd_reset, s); - return 0; } void lm832x_key_event(DeviceState *dev, int key, int state) @@ -505,7 +504,7 @@ static void lm8323_class_init(ObjectClass *klass, void *data) DeviceClass *dc = DEVICE_CLASS(klass); I2CSlaveClass *k = I2C_SLAVE_CLASS(klass); - k->init = lm8323_init; + dc->realize = lm8323_realize; k->event = lm_i2c_event; k->recv = lm_i2c_rx; k->send = lm_i2c_tx; |