Revision 3f582262 hw/smbus.c
b/hw/smbus.c | ||
---|---|---|
193 | 193 |
{ |
194 | 194 |
SMBusDevice *dev; |
195 | 195 |
|
196 |
if (size < sizeof(SMBusDevice)) |
|
197 |
cpu_abort(cpu_single_env, "SMBus struct too small"); |
|
198 |
|
|
196 | 199 |
dev = (SMBusDevice *)i2c_slave_init(bus, address, size); |
197 | 200 |
dev->i2c.event = smbus_i2c_event; |
198 | 201 |
dev->i2c.recv = smbus_i2c_recv; |
Also available in: Unified diff