[Bluetooth] Make use of virtual devices tree
[pandora-kernel.git] / arch / sparc / kernel / ebus.c
index a7a4892..75ac24d 100644 (file)
@@ -7,7 +7,6 @@
  * Fixes for different platforms by Pete Zaitcev.
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/init.h>
@@ -278,7 +277,7 @@ void __init ebus_init(void)
        struct pci_dev *pdev;
        struct pcidev_cookie *cookie;
        struct device_node *dp;
-       unsigned long addr, *base;
+       struct resource *p;
        unsigned short pci_command;
        int len, reg, nreg;
        int num_ebus = 0;
@@ -322,13 +321,12 @@ void __init ebus_init(void)
                }
                nreg = len / sizeof(struct linux_prom_pci_registers);
 
-               base = &ebus->self->resource[0].start;
+               p = &ebus->self->resource[0];
                for (reg = 0; reg < nreg; reg++) {
                        if (!(regs[reg].which_io & 0x03000000))
                                continue;
 
-                       addr = regs[reg].phys_lo;
-                       *base++ = addr;
+                       (p++)->start = regs[reg].phys_lo;
                }
 
                ebus->ofdev.node = dp;