diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2009-06-10 09:41:42 +0200 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2009-06-11 13:47:36 +0100 |
commit | 074f2fff798cb8f9588080b740dc356217a24720 (patch) | |
tree | 4a7267d64bbe8d679627699b6545c9fcd23bb270 /hw/lm832x.c | |
parent | 57b452a8487df30d084ce2b56a993ba7473469e3 (diff) | |
download | qemu-074f2fff798cb8f9588080b740dc356217a24720.tar.gz qemu-074f2fff798cb8f9588080b740dc356217a24720.tar.bz2 qemu-074f2fff798cb8f9588080b740dc356217a24720.zip |
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.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/lm832x.c b/hw/lm832x.c index 74eeca2e97..18ea1f59aa 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) |