On Sun, 2013-11-17 at 18:52 +0100, John Crispin wrote:
> Hi,
>
> rather than fix up the patches, could you send a patch that sits on
> top
> of the existing ones that i can fold myself please ?
>
> John
OK, here is a theoretical file that would sit in
target/linux/lantiq/patches-3.10, minus the whitespace fix, which really
should be made in the existing patch, otherwise quilt complains.
--- a/arch/mips/lantiq/xway/ath_eep.c
+++ b/arch/mips/lantiq/xway/ath_eep.c
@@ -36,6 +36,7 @@
return 0;
}
+static int ath9k_eep_load;
int __init of_ath9k_eeprom_probe(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node, *mtd_np;
@@ -112,6 +113,12 @@
if (!of_property_read_u32(np, "ath,pci-slot", &pci_slot)) {
ltq_pci_ath_fixup(pci_slot, ath9k_pdata.eeprom_data);
dev_info(&pdev->dev, "pci slot: %u\n", pci_slot);
+ if (ath9k_eep_load) {
+ struct pci_dev *d = NULL;
+ while ((d = pci_get_device(PCI_VENDOR_ID_ATHEROS,
+ PCI_ANY_ID, d)) != NULL)
+ pci_fixup_device(pci_fixup_early, d);
+ }
}
dev_info(&pdev->dev, "loaded ath9k eeprom\n");
@@ -132,20 +139,19 @@
},
};
-static int ath9k_eep_loaded;
static int __init of_ath9k_eeprom_init(void)
{
int ret = platform_driver_probe(&ath9k_eeprom_driver,
of_ath9k_eeprom_probe);
- if (!ret)
- ath9k_eep_loaded = 1;
+ if (ret)
+ ath9k_eep_load = 1;
return ret;
}
static int __init of_ath9k_eeprom_init_late(void)
{
- if (ath9k_eep_loaded)
+ if (!ath9k_eep_load)
return 0;
return platform_driver_probe(&ath9k_eeprom_driver,
of_ath9k_eeprom_probe);
}
@@ -247,4 +253,4 @@
{
return platform_driver_probe(&ath5k_eeprom_driver,
of_ath5k_eeprom_probe);
}
-device_initcall(of_ath5k_eeprom_init);
+subsys_initcall(of_ath5k_eeprom_init);
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel