kernel: update MIPS pci fix to the accepted version
[openwrt/openwrt.git] / target / linux / lantiq / patches-4.9 / 0001-MIPS-lantiq-add-pcie-driver.patch
index 16d3f558bc4cf95c9ab2cb471a45abee365ee6db..59d29d838be18db8692910e48fd8e7c1f9f2ae3b 100644 (file)
@@ -4143,7 +4143,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +
 --- a/arch/mips/pci/pci-legacy.c
 +++ b/arch/mips/pci/pci-legacy.c
-@@ -300,3 +300,31 @@ char *__init pcibios_setup(char *str)
+@@ -300,3 +300,30 @@ char *__init pcibios_setup(char *str)
                return pcibios_plat_setup(str);
        return str;
  }
@@ -4164,8 +4164,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +    int bus_nr = 0;
 +    struct pci_controller *hose;
 +
-+    if (!list_empty(&controllers))
-+        hose = list_last_entry(&controllers, struct pci_controller, list);
++    hose = list_first_entry_or_null(&controllers, struct pci_controller, list);
 +
 +    if (hose != NULL) {
 +        if (hose->bus != NULL) {