mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -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
|
@ -526,6 +526,8 @@ void lm832x_key_event(struct i2c_slave *i2c, int key, int state)
|
|||
}
|
||||
|
||||
static I2CSlaveInfo lm8323_info = {
|
||||
.qdev.name = "lm8323",
|
||||
.qdev.size = sizeof(LM823KbdState),
|
||||
.init = lm8323_init,
|
||||
.event = lm_i2c_event,
|
||||
.recv = lm_i2c_rx,
|
||||
|
@ -534,7 +536,7 @@ static I2CSlaveInfo lm8323_info = {
|
|||
|
||||
static void lm832x_register_devices(void)
|
||||
{
|
||||
i2c_register_slave("lm8323", sizeof(LM823KbdState), &lm8323_info);
|
||||
i2c_register_slave(&lm8323_info);
|
||||
}
|
||||
|
||||
device_init(lm832x_register_devices)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue