+
--- /dev/null
+++ b/arch/mips/pci/ifxmips_pcie_ar10.h
-@@ -0,0 +1,290 @@
+@@ -0,0 +1,305 @@
+/****************************************************************************
+ Copyright (c) 2010
+ Lantiq Deutschland GmbH
+ return tbus_number;
+}
+
++static struct pci_dev *ifx_pci_get_slot(struct pci_bus *bus, unsigned int devfn)
++{
++ struct pci_dev *dev;
++
++ list_for_each_entry(dev, &bus->devices, bus_list) {
++ if (dev->devfn == devfn)
++ goto out;
++ }
++
++ dev = NULL;
++ out:
++ pci_dev_get(dev);
++ return dev;
++}
++
+static inline u32
+ifx_pcie_bus_enum_hack(struct pci_bus *bus, u32 devfn, int where, u32 value, int pcie_port, int read)
+{
+ u32 tvalue = value;
+
+ /* Sanity check */
-+ pdev = pci_get_slot(bus, devfn);
++ pdev = ifx_pci_get_slot(bus, devfn);
+ if (pdev == NULL) {
+ return tvalue;
+ }
+
--- /dev/null
+++ b/arch/mips/pci/ifxmips_pcie_vr9.h
-@@ -0,0 +1,269 @@
+@@ -0,0 +1,284 @@
+/****************************************************************************
+ Copyright (c) 2010
+ Lantiq Deutschland GmbH
+ return tbus_number;
+}
+
++static inline struct pci_dev *ifx_pci_get_slot(struct pci_bus *bus, unsigned int devfn)
++{
++ struct pci_dev *dev;
++
++ list_for_each_entry(dev, &bus->devices, bus_list) {
++ if (dev->devfn == devfn)
++ goto out;
++ }
++
++ dev = NULL;
++ out:
++ pci_dev_get(dev);
++ return dev;
++}
++
+static inline u32
+ifx_pcie_bus_enum_hack(struct pci_bus *bus, u32 devfn, int where, u32 value, int pcie_port, int read)
+{
+ u32 tvalue = value;
+
+ /* Sanity check */
-+ pdev = pci_get_slot(bus, devfn);
++ pdev = ifx_pci_get_slot(bus, devfn);
+ if (pdev == NULL) {
+ return tvalue;
+ }
+EXPORT_SYMBOL(pcibios_1st_host_bus_nr);
--- /dev/null
+++ b/arch/mips/pci/pcie-lantiq.h
-@@ -0,0 +1,1301 @@
+@@ -0,0 +1,1316 @@
+/******************************************************************************
+**
+** FILE NAME : ifxmips_pcie_reg.h
+ return tbus_number;
+}
+
++static struct pci_dev *ifx_pci_get_slot(struct pci_bus *bus, unsigned int devfn)
++{
++ struct pci_dev *dev;
++
++ list_for_each_entry(dev, &bus->devices, bus_list) {
++ if (dev->devfn == devfn)
++ goto out;
++ }
++
++ dev = NULL;
++ out:
++ pci_dev_get(dev);
++ return dev;
++}
++
+static inline u32
+ifx_pcie_bus_enum_hack(struct pci_bus *bus, u32 devfn, int where, u32 value, int pcie_port, int read)
+{
+ u32 tvalue = value;
+
+ /* Sanity check */
-+ pdev = pci_get_slot(bus, devfn);
++ pdev = ifx_pci_get_slot(bus, devfn);
+ if (pdev == NULL) {
+ return tvalue;
+ }