aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2009-05-14 22:35:08 +0100
committerPaul Brook <paul@codesourcery.com>2009-05-14 22:35:08 +0100
commite325e1f83e803922e5d33b47203d49e4ba2d5a0a (patch)
tree5cc0f72e2d0ac9d6d21e93e504f6a32f75ab0ab7 /hw
parent0077147eab09ec56d27194cc1c6135f2b39ad652 (diff)
downloadqemu-e325e1f83e803922e5d33b47203d49e4ba2d5a0a.zip
qemu-e325e1f83e803922e5d33b47203d49e4ba2d5a0a.tar.gz
qemu-e325e1f83e803922e5d33b47203d49e4ba2d5a0a.tar.bz2
I2C cleanup
Signed-off-by: Paul Brook <paul@codesourcery.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/i2c.c21
-rw-r--r--hw/i2c.h5
2 files changed, 0 insertions, 26 deletions
diff --git a/hw/i2c.c b/hw/i2c.c
index e694025..ce9de29 100644
--- a/hw/i2c.c
+++ b/hw/i2c.c
@@ -48,23 +48,6 @@ i2c_bus *i2c_init_bus(void)
return bus;
}
-/* Create a new slave device. */
-i2c_slave *i2c_slave_init(i2c_bus *bus, int address, int size)
-{
- i2c_slave *dev;
-
- if (size < sizeof(i2c_slave))
- hw_error("I2C struct too small");
-
- dev = (i2c_slave *)qemu_mallocz(size);
- dev->address = address;
- dev->next = bus->dev;
- bus->dev = dev;
- dev->qdev.bus = bus;
-
- return dev;
-}
-
void i2c_set_slave_address(i2c_slave *dev, int address)
{
dev->address = address;
@@ -165,10 +148,6 @@ static void i2c_slave_qdev_init(DeviceState *dev, void *opaque)
s->next = s->bus->dev;
s->bus->dev = s;
- s->event = info->event;
- s->recv = info->recv;
- s->send = info->send;
-
info->init(s);
}
diff --git a/hw/i2c.h b/hw/i2c.h
index eba5fa0..55d6ec5 100644
--- a/hw/i2c.h
+++ b/hw/i2c.h
@@ -36,10 +36,6 @@ struct i2c_slave
{
DeviceState qdev;
I2CSlaveInfo *info;
- /* FIXME: These 3 should go away once all devices have been converted. */
- i2c_event_cb event;
- i2c_recv_cb recv;
- i2c_send_cb send;
/* Remaining fields for internal use by the I2C code. */
int address;
@@ -48,7 +44,6 @@ struct i2c_slave
};
i2c_bus *i2c_init_bus(void);
-i2c_slave *i2c_slave_init(i2c_bus *bus, int address, int size);
void i2c_set_slave_address(i2c_slave *dev, int address);
int i2c_bus_busy(i2c_bus *bus);
int i2c_start_transfer(i2c_bus *bus, int address, int recv);