summaryrefslogtreecommitdiffstats
path: root/hw/twl92230.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/twl92230.c
parent57b452a8487df30d084ce2b56a993ba7473469e3 (diff)
downloadhqemu-074f2fff798cb8f9588080b740dc356217a24720.zip
hqemu-074f2fff798cb8f9588080b740dc356217a24720.tar.gz
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/twl92230.c')
-rw-r--r--hw/twl92230.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/twl92230.c b/hw/twl92230.c
index 3a22692..9960acc 100644
--- a/hw/twl92230.c
+++ b/hw/twl92230.c
@@ -892,6 +892,8 @@ static void twl92230_init(i2c_slave *i2c)
}
static I2CSlaveInfo twl92230_info = {
+ .qdev.name ="twl92230",
+ .qdev.size = sizeof(MenelausState),
.init = twl92230_init,
.event = menelaus_event,
.recv = menelaus_rx,
@@ -900,7 +902,7 @@ static I2CSlaveInfo twl92230_info = {
static void twl92230_register_devices(void)
{
- i2c_register_slave("twl92230", sizeof(MenelausState), &twl92230_info);
+ i2c_register_slave(&twl92230_info);
}
device_init(twl92230_register_devices)
OpenPOWER on IntegriCloud