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/tosa.c | |
parent | 57b452a8487df30d084ce2b56a993ba7473469e3 (diff) |
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/tosa.c')
-rw-r--r-- | hw/tosa.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -252,6 +252,8 @@ static void tosapda_machine_init(void) machine_init(tosapda_machine_init); static I2CSlaveInfo tosa_dac_info = { + .qdev.name = "tosa_dac", + .qdev.size = sizeof(TosaDACState), .init = tosa_dac_init, .event = tosa_dac_event, .recv = tosa_dac_recv, @@ -259,14 +261,16 @@ static I2CSlaveInfo tosa_dac_info = { }; static SSISlaveInfo tosa_ssp_info = { + .qdev.name = "tosa-ssp", + .qdev.size = sizeof(SSISlave), .init = tosa_ssp_init, .transfer = tosa_ssp_tansfer }; static void tosa_register_devices(void) { - i2c_register_slave("tosa_dac", sizeof(TosaDACState), &tosa_dac_info); - ssi_register_slave("tosa-ssp", sizeof(SSISlave), &tosa_ssp_info); + i2c_register_slave(&tosa_dac_info); + ssi_register_slave(&tosa_ssp_info); } device_init(tosa_register_devices) |