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:
Gerd Hoffmann 2009-06-10 09:41:42 +02:00 committed by Paul Brook
parent 57b452a848
commit 074f2fff79
27 changed files with 95 additions and 61 deletions

View file

@ -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)