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/wm8750.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/wm8750.c')
-rw-r--r-- | hw/wm8750.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/wm8750.c b/hw/wm8750.c index 9f5bd46de4..0c0dbba58b 100644 --- a/hw/wm8750.c +++ b/hw/wm8750.c @@ -726,6 +726,8 @@ void wm8750_set_bclk_in(void *opaque, int new_hz) } static I2CSlaveInfo wm8750_info = { + .qdev.name = "wm8750", + .qdev.size = sizeof(WM8750State), .init = wm8750_init, .event = wm8750_event, .recv = wm8750_rx, @@ -734,7 +736,7 @@ static I2CSlaveInfo wm8750_info = { static void wm8750_register_devices(void) { - i2c_register_slave("wm8750", sizeof(WM8750State), &wm8750_info); + i2c_register_slave(&wm8750_info); } device_init(wm8750_register_devices) |