summary refs log tree commit diff stats
path: root/hw/tmp105.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/tmp105.c
parent57b452a8487df30d084ce2b56a993ba7473469e3 (diff)
downloadfocaccia-qemu-074f2fff798cb8f9588080b740dc356217a24720.tar.gz
focaccia-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/tmp105.c')
-rw-r--r--hw/tmp105.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/tmp105.c b/hw/tmp105.c
index 59b039804d..5381b7d66a 100644
--- a/hw/tmp105.c
+++ b/hw/tmp105.c
@@ -239,6 +239,8 @@ static void tmp105_init(i2c_slave *i2c)
 }
 
 static I2CSlaveInfo tmp105_info = {
+    .qdev.name = "tmp105",
+    .qdev.size = sizeof(TMP105State),
     .init = tmp105_init,
     .event = tmp105_event,
     .recv = tmp105_rx,
@@ -247,7 +249,7 @@ static I2CSlaveInfo tmp105_info = {
 
 static void tmp105_register_devices(void)
 {
-    i2c_register_slave("tmp105", sizeof(TMP105State), &tmp105_info);
+    i2c_register_slave(&tmp105_info);
 }
 
 device_init(tmp105_register_devices)