Merge branch 'skip_delete_inode' of git://git.kernel.org/pub/scm/linux/kernel/git...
[pandora-kernel.git] / arch / powerpc / platforms / cell / celleb_pci.c
index f39a3b2..404d1fc 100644 (file)
@@ -33,6 +33,7 @@
 #include <linux/pci_regs.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
+#include <linux/slab.h>
 
 #include <asm/io.h>
 #include <asm/irq.h>
@@ -162,8 +163,7 @@ static int celleb_fake_pci_read_config(struct pci_bus *bus,
                unsigned int devfn, int where, int size, u32 *val)
 {
        char *config;
-       struct device_node *node;
-       struct pci_controller *hose;
+       struct pci_controller *hose = pci_bus_to_host(bus);
        unsigned int devno = devfn >> 3;
        unsigned int fn = devfn & 0x7;
 
@@ -171,8 +171,6 @@ static int celleb_fake_pci_read_config(struct pci_bus *bus,
        BUG_ON(where % size);
 
        pr_debug("    fake read: bus=0x%x, ", bus->number);
-       node = (struct device_node *)bus->sysdata;
-       hose = pci_find_hose_for_OF_device(node);
        config = get_fake_config_start(hose, devno, fn);
 
        pr_debug("devno=0x%x, where=0x%x, size=0x%x, ", devno, where, size);
@@ -192,8 +190,7 @@ static int celleb_fake_pci_write_config(struct pci_bus *bus,
                unsigned int devfn, int where, int size, u32 val)
 {
        char *config;
-       struct device_node *node;
-       struct pci_controller *hose;
+       struct pci_controller *hose = pci_bus_to_host(bus);
        struct celleb_pci_resource *res;
        unsigned int devno = devfn >> 3;
        unsigned int fn = devfn & 0x7;
@@ -201,8 +198,6 @@ static int celleb_fake_pci_write_config(struct pci_bus *bus,
        /* allignment check */
        BUG_ON(where % size);
 
-       node = (struct device_node *)bus->sysdata;
-       hose = pci_find_hose_for_OF_device(node);
        config = get_fake_config_start(hose, devno, fn);
 
        if (!config)