Revision 074f2fff hw/smbus.c

b/hw/smbus.c
206 206
    t->init(dev);
207 207
}
208 208

  
209
void smbus_register_device(const char *name, int size, SMBusDeviceInfo *info)
209
void smbus_register_device(SMBusDeviceInfo *info)
210 210
{
211
    assert(size >= sizeof(SMBusDevice));
211
    assert(info->i2c.qdev.size >= sizeof(SMBusDevice));
212 212
    info->i2c.init = smbus_device_init;
213 213
    info->i2c.event = smbus_i2c_event;
214 214
    info->i2c.recv = smbus_i2c_recv;
215 215
    info->i2c.send = smbus_i2c_send;
216
    i2c_register_slave(name, size, &info->i2c);
216
    i2c_register_slave(&info->i2c);
217 217
}
218 218

  
219 219
/* Master device commands.  */

Also available in: Unified diff