mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 18:44:58 -06:00
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>
This commit is contained in:
parent
57b452a848
commit
074f2fff79
27 changed files with 95 additions and 61 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue