aboutsummaryrefslogtreecommitdiff
path: root/hw/lm832x.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-06-10 09:41:42 +0200
committerPaul Brook <paul@codesourcery.com>2009-06-11 13:47:36 +0100
commit074f2fff798cb8f9588080b740dc356217a24720 (patch)
tree4a7267d64bbe8d679627699b6545c9fcd23bb270 /hw/lm832x.c
parent57b452a8487df30d084ce2b56a993ba7473469e3 (diff)
downloadqemu-074f2fff798cb8f9588080b740dc356217a24720.zip
qemu-074f2fff798cb8f9588080b740dc356217a24720.tar.gz
qemu-074f2fff798cb8f9588080b740dc356217a24720.tar.bz2
qdev: move name+size into DeviceInfo (v2)
Rationale: move device information from code to data structures. v2: Adapt the drivers missed in the first version. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/lm832x.c')
-rw-r--r--hw/lm832x.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/lm832x.c b/hw/lm832x.c
index 74eeca2..18ea1f5 100644
--- a/hw/lm832x.c
+++ b/hw/lm832x.c
@@ -526,6 +526,8 @@ void lm832x_key_event(struct i2c_slave *i2c, int key, int state)
}
static I2CSlaveInfo lm8323_info = {
+ .qdev.name = "lm8323",
+ .qdev.size = sizeof(LM823KbdState),
.init = lm8323_init,
.event = lm_i2c_event,
.recv = lm_i2c_rx,
@@ -534,7 +536,7 @@ static I2CSlaveInfo lm8323_info = {
static void lm832x_register_devices(void)
{
- i2c_register_slave("lm8323", sizeof(LM823KbdState), &lm8323_info);
+ i2c_register_slave(&lm8323_info);
}
device_init(lm832x_register_devices)