Re: [RFC][PATCH 01/10] bcma: Use array to store cores.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greg, Arnd: could you take a look at this patch, please?

With proposed patch we are going back to this ugly array and wrappers hacks.

I was really happy with our final solution, but it seems it's not
doable for embedded systems...? Is there something better we can do
about this?

2011/6/6 Hauke Mehrtens <hauke@xxxxxxxxxx>:
> When using bcma on a embedded device it is initialized very early at
> boot. We have to do so as the cpu and interrupt management and all
> other devices are attached to this bus and it has to be initialized so
> early. In that stage we can not allocate memory or sleep, just use the
> memory on the stack and in the text segment as the kernel is not
> initialized far enough. This patch removed the kzallocs from the scan
> code. Some earlier version of the bcma implementation and the normal
> ssb implementation are doing it like this.
> The __bcma_dev_wrapper struct is used as the container for the device
> struct as bcma_device will be too big if it includes struct device.
>
> Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
> ---
> Âdrivers/bcma/main.c    |  86 ++++++++++++++++++++++++++++----------------
> Âdrivers/bcma/scan.c    |  58 +++++++++++-------------------
> Âinclude/linux/bcma/bcma.h | Â 16 ++++++--
> Â3 files changed, 89 insertions(+), 71 deletions(-)
>
> diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
> index a2f6b18..b0e7f5e 100644
> --- a/drivers/bcma/main.c
> +++ b/drivers/bcma/main.c
> @@ -17,23 +17,27 @@ static int bcma_device_remove(struct device *dev);
>
> Âstatic ssize_t manuf_show(struct device *dev, struct device_attribute *attr, char *buf)
> Â{
> - Â Â Â struct bcma_device *core = container_of(dev, struct bcma_device, dev);
> - Â Â Â return sprintf(buf, "0x%03X\n", core->id.manuf);
> + Â Â Â struct __bcma_dev_wrapper *wrapper = container_of(dev,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â struct __bcma_dev_wrapper, dev);
> + Â Â Â return sprintf(buf, "0x%03X\n", wrapper->core->id.manuf);
> Â}
> Âstatic ssize_t id_show(struct device *dev, struct device_attribute *attr, char *buf)
> Â{
> - Â Â Â struct bcma_device *core = container_of(dev, struct bcma_device, dev);
> - Â Â Â return sprintf(buf, "0x%03X\n", core->id.id);
> + Â Â Â struct __bcma_dev_wrapper *wrapper = container_of(dev,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â struct __bcma_dev_wrapper, dev);
> + Â Â Â return sprintf(buf, "0x%03X\n", wrapper->core->id.id);
> Â}
> Âstatic ssize_t rev_show(struct device *dev, struct device_attribute *attr, char *buf)
> Â{
> - Â Â Â struct bcma_device *core = container_of(dev, struct bcma_device, dev);
> - Â Â Â return sprintf(buf, "0x%02X\n", core->id.rev);
> + Â Â Â struct __bcma_dev_wrapper *wrapper = container_of(dev,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â struct __bcma_dev_wrapper, dev);
> + Â Â Â return sprintf(buf, "0x%02X\n", wrapper->core->id.rev);
> Â}
> Âstatic ssize_t class_show(struct device *dev, struct device_attribute *attr, char *buf)
> Â{
> - Â Â Â struct bcma_device *core = container_of(dev, struct bcma_device, dev);
> - Â Â Â return sprintf(buf, "0x%X\n", core->id.class);
> + Â Â Â struct __bcma_dev_wrapper *wrapper = container_of(dev,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â struct __bcma_dev_wrapper, dev);
> + Â Â Â return sprintf(buf, "0x%X\n", wrapper->core->id.class);
> Â}
> Âstatic struct device_attribute bcma_device_attrs[] = {
> Â Â Â Â__ATTR_RO(manuf),
> @@ -53,27 +57,30 @@ static struct bus_type bcma_bus_type = {
>
> Âstatic struct bcma_device *bcma_find_core(struct bcma_bus *bus, u16 coreid)
> Â{
> - Â Â Â struct bcma_device *core;
> -
> - Â Â Â list_for_each_entry(core, &bus->cores, list) {
> - Â Â Â Â Â Â Â if (core->id.id == coreid)
> - Â Â Â Â Â Â Â Â Â Â Â return core;
> + Â Â Â u8 i;
> + Â Â Â for (i = 0; i < bus->nr_cores; i++) {
> + Â Â Â Â Â Â Â if (bus->cores[i].id.id == coreid)
> + Â Â Â Â Â Â Â Â Â Â Â return &bus->cores[i];
> Â Â Â Â}
> Â Â Â Âreturn NULL;
> Â}
>
> Âstatic void bcma_release_core_dev(struct device *dev)
> Â{
> - Â Â Â struct bcma_device *core = container_of(dev, struct bcma_device, dev);
> - Â Â Â kfree(core);
> + Â Â Â struct __bcma_dev_wrapper *wrapper = container_of(dev,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â struct __bcma_dev_wrapper, dev);
> + Â Â Â kfree(wrapper);
> Â}
>
> Âstatic int bcma_register_cores(struct bcma_bus *bus)
> Â{
> Â Â Â Âstruct bcma_device *core;
> - Â Â Â int err, dev_id = 0;
> + Â Â Â struct __bcma_dev_wrapper *wrapper;
> + Â Â Â int i, err, dev_id = 0;
> +
> + Â Â Â for (i = 0; i < bus->nr_cores; i++) {
> + Â Â Â Â Â Â Â core = &(bus->cores[i]);
>
> - Â Â Â list_for_each_entry(core, &bus->cores, list) {
> Â Â Â Â Â Â Â Â/* We support that cores ourself */
> Â Â Â Â Â Â Â Âswitch (core->id.id) {
> Â Â Â Â Â Â Â Âcase BCMA_CORE_CHIPCOMMON:
> @@ -82,28 +89,37 @@ static int bcma_register_cores(struct bcma_bus *bus)
> Â Â Â Â Â Â Â Â Â Â Â Âcontinue;
> Â Â Â Â Â Â Â Â}
>
> - Â Â Â Â Â Â Â core->dev.release = bcma_release_core_dev;
> - Â Â Â Â Â Â Â core->dev.bus = &bcma_bus_type;
> - Â Â Â Â Â Â Â dev_set_name(&core->dev, "bcma%d:%d", 0/*bus->num*/, dev_id);
> + Â Â Â Â Â Â Â wrapper = kzalloc(sizeof(*wrapper), GFP_KERNEL);
> + Â Â Â Â Â Â Â if (!wrapper) {
> + Â Â Â Â Â Â Â Â Â Â Â pr_err("Could not allocate wrapper for core 0x%03X\n",
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âcore->id.id);
> + Â Â Â Â Â Â Â Â Â Â Â continue;
> + Â Â Â Â Â Â Â }
> +
> + Â Â Â Â Â Â Â wrapper->core = core;
> + Â Â Â Â Â Â Â wrapper->dev.release = bcma_release_core_dev;
> + Â Â Â Â Â Â Â wrapper->dev.bus = &bcma_bus_type;
> + Â Â Â Â Â Â Â dev_set_name(&wrapper->dev, "bcma%d:%d", 0/*bus->num*/, dev_id);
>
> Â Â Â Â Â Â Â Âswitch (bus->hosttype) {
> Â Â Â Â Â Â Â Âcase BCMA_HOSTTYPE_PCI:
> - Â Â Â Â Â Â Â Â Â Â Â core->dev.parent = &bus->host_pci->dev;
> - Â Â Â Â Â Â Â Â Â Â Â core->dma_dev = &bus->host_pci->dev;
> - Â Â Â Â Â Â Â Â Â Â Â core->irq = bus->host_pci->irq;
> + Â Â Â Â Â Â Â Â Â Â Â wrapper->dev.parent = &bus->host_pci->dev;
> + Â Â Â Â Â Â Â Â Â Â Â wrapper->core->dma_dev = &bus->host_pci->dev;
> + Â Â Â Â Â Â Â Â Â Â Â wrapper->core->irq = bus->host_pci->irq;
> Â Â Â Â Â Â Â Â Â Â Â Âbreak;
> Â Â Â Â Â Â Â Âcase BCMA_HOSTTYPE_NONE:
> Â Â Â Â Â Â Â Âcase BCMA_HOSTTYPE_SDIO:
> Â Â Â Â Â Â Â Â Â Â Â Âbreak;
> Â Â Â Â Â Â Â Â}
>
> - Â Â Â Â Â Â Â err = device_register(&core->dev);
> + Â Â Â Â Â Â Â err = device_register(&wrapper->dev);
> Â Â Â Â Â Â Â Âif (err) {
> Â Â Â Â Â Â Â Â Â Â Â Âpr_err("Could not register dev for core 0x%03X\n",
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â core->id.id);
> + Â Â Â Â Â Â Â Â Â Â Â kfree(wrapper);
> Â Â Â Â Â Â Â Â Â Â Â Âcontinue;
> Â Â Â Â Â Â Â Â}
> - Â Â Â Â Â Â Â core->dev_registered = true;
> + Â Â Â Â Â Â Â core->dev = &wrapper->dev;
> Â Â Â Â Â Â Â Âdev_id++;
> Â Â Â Â}
>
> @@ -113,10 +129,12 @@ static int bcma_register_cores(struct bcma_bus *bus)
> Âstatic void bcma_unregister_cores(struct bcma_bus *bus)
> Â{
> Â Â Â Âstruct bcma_device *core;
> + Â Â Â int i;
>
> - Â Â Â list_for_each_entry(core, &bus->cores, list) {
> - Â Â Â Â Â Â Â if (core->dev_registered)
> - Â Â Â Â Â Â Â Â Â Â Â device_unregister(&core->dev);
> + Â Â Â for (i = 0; i < bus->nr_cores; i++) {
> + Â Â Â Â Â Â Â core = &(bus->cores[i]);
> + Â Â Â Â Â Â Â if (core->dev)
> + Â Â Â Â Â Â Â Â Â Â Â device_unregister(core->dev);
> Â Â Â Â}
> Â}
>
> @@ -179,7 +197,9 @@ EXPORT_SYMBOL_GPL(bcma_driver_unregister);
>
> Âstatic int bcma_bus_match(struct device *dev, struct device_driver *drv)
> Â{
> - Â Â Â struct bcma_device *core = container_of(dev, struct bcma_device, dev);
> + Â Â Â struct __bcma_dev_wrapper *wrapper = container_of(dev,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â struct __bcma_dev_wrapper, dev);
> + Â Â Â struct bcma_device *core = wrapper->core;
> Â Â Â Âstruct bcma_driver *adrv = container_of(drv, struct bcma_driver, drv);
> Â Â Â Âconst struct bcma_device_id *cid = &core->id;
> Â Â Â Âconst struct bcma_device_id *did;
> @@ -196,7 +216,9 @@ static int bcma_bus_match(struct device *dev, struct device_driver *drv)
>
> Âstatic int bcma_device_probe(struct device *dev)
> Â{
> - Â Â Â struct bcma_device *core = container_of(dev, struct bcma_device, dev);
> + Â Â Â struct __bcma_dev_wrapper *wrapper = container_of(dev,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â struct __bcma_dev_wrapper, dev);
> + Â Â Â struct bcma_device *core = wrapper->core;
> Â Â Â Âstruct bcma_driver *adrv = container_of(dev->driver, struct bcma_driver,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â drv);
> Â Â Â Âint err = 0;
> @@ -209,7 +231,9 @@ static int bcma_device_probe(struct device *dev)
>
> Âstatic int bcma_device_remove(struct device *dev)
> Â{
> - Â Â Â struct bcma_device *core = container_of(dev, struct bcma_device, dev);
> + Â Â Â struct __bcma_dev_wrapper *wrapper = container_of(dev,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â struct __bcma_dev_wrapper, dev);
> + Â Â Â struct bcma_device *core = wrapper->core;
> Â Â Â Âstruct bcma_driver *adrv = container_of(dev->driver, struct bcma_driver,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â drv);
>
> diff --git a/drivers/bcma/scan.c b/drivers/bcma/scan.c
> index 40d7dcc..70b39f7 100644
> --- a/drivers/bcma/scan.c
> +++ b/drivers/bcma/scan.c
> @@ -211,9 +211,6 @@ int bcma_bus_scan(struct bcma_bus *bus)
> Â Â Â Âs32 tmp;
> Â Â Â Âu8 i, j;
>
> - Â Â Â int err;
> -
> - Â Â Â INIT_LIST_HEAD(&bus->cores);
> Â Â Â Âbus->nr_cores = 0;
>
> Â Â Â Âbcma_scan_switch_core(bus, BCMA_ADDR_BASE);
> @@ -230,11 +227,8 @@ int bcma_bus_scan(struct bcma_bus *bus)
> Â Â Â Âbcma_scan_switch_core(bus, erombase);
>
> Â Â Â Âwhile (eromptr < eromend) {
> - Â Â Â Â Â Â Â struct bcma_device *core = kzalloc(sizeof(*core), GFP_KERNEL);
> - Â Â Â Â Â Â Â if (!core)
> - Â Â Â Â Â Â Â Â Â Â Â return -ENOMEM;
> - Â Â Â Â Â Â Â INIT_LIST_HEAD(&core->list);
> - Â Â Â Â Â Â Â core->bus = bus;
> + Â Â Â Â Â Â Â struct bcma_device core = { };
> + Â Â Â Â Â Â Â core.bus = bus;
>
> Â Â Â Â Â Â Â Â/* get CIs */
> Â Â Â Â Â Â Â Âcia = bcma_erom_get_ci(bus, &eromptr);
> @@ -242,27 +236,24 @@ int bcma_bus_scan(struct bcma_bus *bus)
> Â Â Â Â Â Â Â Â Â Â Â Âbcma_erom_push_ent(&eromptr);
> Â Â Â Â Â Â Â Â Â Â Â Âif (bcma_erom_is_end(bus, &eromptr))
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âbreak;
> - Â Â Â Â Â Â Â Â Â Â Â err= -EILSEQ;
> - Â Â Â Â Â Â Â Â Â Â Â goto out;
> + Â Â Â Â Â Â Â Â Â Â Â return -EILSEQ;
> Â Â Â Â Â Â Â Â}
> Â Â Â Â Â Â Â Âcib = bcma_erom_get_ci(bus, &eromptr);
> - Â Â Â Â Â Â Â if (cib < 0) {
> - Â Â Â Â Â Â Â Â Â Â Â err= -EILSEQ;
> - Â Â Â Â Â Â Â Â Â Â Â goto out;
> - Â Â Â Â Â Â Â }
> + Â Â Â Â Â Â Â if (cib < 0)
> + Â Â Â Â Â Â Â Â Â Â Â return -EILSEQ;
>
> Â Â Â Â Â Â Â Â/* parse CIs */
> - Â Â Â Â Â Â Â core->id.class = (cia & SCAN_CIA_CLASS) >> SCAN_CIA_CLASS_SHIFT;
> - Â Â Â Â Â Â Â core->id.id = (cia & SCAN_CIA_ID) >> SCAN_CIA_ID_SHIFT;
> - Â Â Â Â Â Â Â core->id.manuf = (cia & SCAN_CIA_MANUF) >> SCAN_CIA_MANUF_SHIFT;
> + Â Â Â Â Â Â Â core.id.class = (cia & SCAN_CIA_CLASS) >> SCAN_CIA_CLASS_SHIFT;
> + Â Â Â Â Â Â Â core.id.id = (cia & SCAN_CIA_ID) >> SCAN_CIA_ID_SHIFT;
> + Â Â Â Â Â Â Â core.id.manuf = (cia & SCAN_CIA_MANUF) >> SCAN_CIA_MANUF_SHIFT;
> Â Â Â Â Â Â Â Âports[0] = (cib & SCAN_CIB_NMP) >> SCAN_CIB_NMP_SHIFT;
> Â Â Â Â Â Â Â Âports[1] = (cib & SCAN_CIB_NSP) >> SCAN_CIB_NSP_SHIFT;
> Â Â Â Â Â Â Â Âwrappers[0] = (cib & SCAN_CIB_NMW) >> SCAN_CIB_NMW_SHIFT;
> Â Â Â Â Â Â Â Âwrappers[1] = (cib & SCAN_CIB_NSW) >> SCAN_CIB_NSW_SHIFT;
> - Â Â Â Â Â Â Â core->id.rev = (cib & SCAN_CIB_REV) >> SCAN_CIB_REV_SHIFT;
> + Â Â Â Â Â Â Â core.id.rev = (cib & SCAN_CIB_REV) >> SCAN_CIB_REV_SHIFT;
>
> - Â Â Â Â Â Â Â if (((core->id.manuf == BCMA_MANUF_ARM) &&
> - Â Â Â Â Â Â Â Â Â Â(core->id.id == 0xFFF)) ||
> + Â Â Â Â Â Â Â if (((core.id.manuf == BCMA_MANUF_ARM) &&
> + Â Â Â Â Â Â Â Â Â Â(core.id.id == 0xFFF)) ||
> Â Â Â Â Â Â Â Â Â Â(ports[1] == 0)) {
> Â Â Â Â Â Â Â Â Â Â Â Âbcma_erom_skip_component(bus, &eromptr);
> Â Â Â Â Â Â Â Â Â Â Â Âcontinue;
> @@ -285,10 +276,8 @@ int bcma_bus_scan(struct bcma_bus *bus)
> Â Â Â Â Â Â Â Â/* get & parse master ports */
> Â Â Â Â Â Â Â Âfor (i = 0; i < ports[0]; i++) {
> Â Â Â Â Â Â Â Â Â Â Â Âu32 mst_port_d = bcma_erom_get_mst_port(bus, &eromptr);
> - Â Â Â Â Â Â Â Â Â Â Â if (mst_port_d < 0) {
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â err= -EILSEQ;
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â goto out;
> - Â Â Â Â Â Â Â Â Â Â Â }
> + Â Â Â Â Â Â Â Â Â Â Â if (mst_port_d < 0)
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â return -EILSEQ;
> Â Â Â Â Â Â Â Â}
>
> Â Â Â Â Â Â Â Â/* get & parse slave ports */
> @@ -303,7 +292,7 @@ int bcma_bus_scan(struct bcma_bus *bus)
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âbreak;
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â} else {
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âif (i == 0 && j == 0)
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â core->addr = tmp;
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â core.addr = tmp;
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â}
> Â Â Â Â Â Â Â Â Â Â Â Â}
> Â Â Â Â Â Â Â Â}
> @@ -320,7 +309,7 @@ int bcma_bus_scan(struct bcma_bus *bus)
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âbreak;
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â} else {
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âif (i == 0 && j == 0)
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â core->wrap = tmp;
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â core.wrap = tmp;
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â}
> Â Â Â Â Â Â Â Â Â Â Â Â}
> Â Â Â Â Â Â Â Â}
> @@ -338,22 +327,19 @@ int bcma_bus_scan(struct bcma_bus *bus)
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âbreak;
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â} else {
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âif (wrappers[0] == 0 && !i && !j)
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â core->wrap = tmp;
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â core.wrap = tmp;
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â}
> Â Â Â Â Â Â Â Â Â Â Â Â}
> Â Â Â Â Â Â Â Â}
>
> Â Â Â Â Â Â Â Âpr_info("Core %d found: %s "
> Â Â Â Â Â Â Â Â Â Â Â Â"(manuf 0x%03X, id 0x%03X, rev 0x%02X, class 0x%X)\n",
> - Â Â Â Â Â Â Â Â Â Â Â bus->nr_cores, bcma_device_name(&core->id),
> - Â Â Â Â Â Â Â Â Â Â Â core->id.manuf, core->id.id, core->id.rev,
> - Â Â Â Â Â Â Â Â Â Â Â core->id.class);
> -
> - Â Â Â Â Â Â Â core->core_index = bus->nr_cores++;
> - Â Â Â Â Â Â Â list_add(&core->list, &bus->cores);
> - Â Â Â Â Â Â Â continue;
> -out:
> - Â Â Â Â Â Â Â return err;
> + Â Â Â Â Â Â Â Â Â Â Â bus->nr_cores, bcma_device_name(&core.id),
> + Â Â Â Â Â Â Â Â Â Â Â core.id.manuf, core.id.id, core.id.rev,
> + Â Â Â Â Â Â Â Â Â Â Â core.id.class);
> +
> + Â Â Â Â Â Â Â core.core_index = bus->nr_cores;
> + Â Â Â Â Â Â Â bus->cores[bus->nr_cores++] = core;
> Â Â Â Â}
>
> Â Â Â Âreturn 0;
> diff --git a/include/linux/bcma/bcma.h b/include/linux/bcma/bcma.h
> index 27a27a7..3dc5302 100644
> --- a/include/linux/bcma/bcma.h
> +++ b/include/linux/bcma/bcma.h
> @@ -118,14 +118,23 @@ struct bcma_host_ops {
>
> Â#define BCMA_MAX_NR_CORES Â Â Â Â Â Â Â16
>
> +/* 1) It is not allowed to put struct device statically in bcma_device
> + * 2) We can not just use pointer to struct device because we use container_of
> + * 3) We do not have pointer to struct bcma_device in struct device
> + * Solution: use such a dummy wrapper
> + */
> +struct __bcma_dev_wrapper {
> + Â Â Â struct device dev;
> + Â Â Â struct bcma_device *core;
> +};
> +
> Âstruct bcma_device {
> Â Â Â Âstruct bcma_bus *bus;
> Â Â Â Âstruct bcma_device_id id;
>
> - Â Â Â struct device dev;
> + Â Â Â struct device *dev;
> Â Â Â Âstruct device *dma_dev;
> Â Â Â Âunsigned int irq;
> - Â Â Â bool dev_registered;
>
> Â Â Â Âu8 core_index;
>
> @@ -133,7 +142,6 @@ struct bcma_device {
> Â Â Â Âu32 wrap;
>
> Â Â Â Âvoid *drvdata;
> - Â Â Â struct list_head list;
> Â};
>
> Âstatic inline void *bcma_get_drvdata(struct bcma_device *core)
> @@ -182,7 +190,7 @@ struct bcma_bus {
> Â Â Â Âstruct bcma_chipinfo chipinfo;
>
> Â Â Â Âstruct bcma_device *mapped_core;
> - Â Â Â struct list_head cores;
> + Â Â Â struct bcma_device cores[BCMA_MAX_NR_CORES];
> Â Â Â Âu8 nr_cores;
>
> Â Â Â Âstruct bcma_drv_cc drv_cc;
> --
> 1.7.4.1



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux