ssi: Convert legacy SSI_BUS -> BUS casts

Remove two legacy ->qbus style casts from TYPE_SSI_BUS to TYPE_BUS in
ssi.c.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
[AF: Convert one missing ->qbus and rename parent field]
Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
Peter Crosthwaite 2014-02-11 16:28:25 -08:00 committed by Andreas Färber
parent 1a7d9ee6dd
commit d43269dddc

View File

@ -15,7 +15,7 @@
#include "hw/ssi.h"
struct SSIBus {
BusState qbus;
BusState parent_obj;
};
#define TYPE_SSI_BUS "SSI"
@ -88,7 +88,7 @@ static const TypeInfo ssi_slave_info = {
DeviceState *ssi_create_slave_no_init(SSIBus *bus, const char *name)
{
return qdev_create(&bus->qbus, name);
return qdev_create(BUS(bus), name);
}
DeviceState *ssi_create_slave(SSIBus *bus, const char *name)
@ -108,11 +108,12 @@ SSIBus *ssi_create_bus(DeviceState *parent, const char *name)
uint32_t ssi_transfer(SSIBus *bus, uint32_t val)
{
BusState *b = BUS(bus);
BusChild *kid;
SSISlaveClass *ssc;
uint32_t r = 0;
QTAILQ_FOREACH(kid, &bus->qbus.children, sibling) {
QTAILQ_FOREACH(kid, &b->children, sibling) {
SSISlave *slave = SSI_SLAVE(kid->child);
ssc = SSI_SLAVE_GET_CLASS(slave);
r |= ssc->transfer_raw(slave, val);
@ -156,7 +157,7 @@ static int ssi_auto_connect_slave(Object *child, void *opaque)
}
cs_line = qdev_get_gpio_in(DEVICE(dev), 0);
qdev_set_parent_bus(DEVICE(dev), &arg->bus->qbus);
qdev_set_parent_bus(DEVICE(dev), BUS(arg->bus));
**arg->cs_linep = cs_line;
(*arg->cs_linep)++;
return 0;