From 074f2fff798cb8f9588080b740dc356217a24720 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 10 Jun 2009 09:41:42 +0200 Subject: 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 --- hw/ssd0303.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'hw/ssd0303.c') diff --git a/hw/ssd0303.c b/hw/ssd0303.c index 5a3a29e..6872ef5 100644 --- a/hw/ssd0303.c +++ b/hw/ssd0303.c @@ -316,6 +316,8 @@ static void ssd0303_init(i2c_slave *i2c) } static I2CSlaveInfo ssd0303_info = { + .qdev.name = "ssd0303", + .qdev.size = sizeof(ssd0303_state), .init = ssd0303_init, .event = ssd0303_event, .recv = ssd0303_recv, @@ -324,7 +326,7 @@ static I2CSlaveInfo ssd0303_info = { static void ssd0303_register_devices(void) { - i2c_register_slave("ssd0303", sizeof(ssd0303_state), &ssd0303_info); + i2c_register_slave(&ssd0303_info); } device_init(ssd0303_register_devices) -- cgit v1.1