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/wm8750.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'hw/wm8750.c') 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) -- cgit v1.2.3