1 Index: linux-3.10.34/arch/mips/lantiq/xway/ath_eep.c
2 ===================================================================
3 --- linux-3.10.34.orig/arch/mips/lantiq/xway/ath_eep.c 2014-04-03 13:25:03.128464891 +0100
4 +++ linux-3.10.34/arch/mips/lantiq/xway/ath_eep.c 2014-04-03 13:35:30.432482868 +0100
9 +static int ath9k_eep_load;
10 int __init of_ath9k_eeprom_probe(struct platform_device *pdev)
12 struct device_node *np = pdev->dev.of_node, *mtd_np;
14 + int mac_offset, led_pin;
15 u32 mac_inc = 0, pci_slot = 0;
17 struct mtd_info *the_mtd;
19 if (!of_property_read_u32(np, "ath,pci-slot", &pci_slot)) {
20 ltq_pci_ath_fixup(pci_slot, ath9k_pdata.eeprom_data);
21 dev_info(&pdev->dev, "pci slot: %u\n", pci_slot);
22 + if (ath9k_eep_load) {
23 + struct pci_dev *d = NULL;
24 + while ((d = pci_get_device(PCI_VENDOR_ID_ATHEROS,
25 + PCI_ANY_ID, d)) != NULL)
26 + pci_fixup_device(pci_fixup_early, d);
30 + if (!of_property_read_u32(np, "ath,led-pin", &led_pin)) {
31 + ath9k_pdata.led_pin = led_pin;
33 + dev_info(&pdev->dev, "using led pin %d.\n", led_pin);
36 dev_info(&pdev->dev, "loaded ath9k eeprom\n");
41 -static int ath9k_eep_loaded;
42 static int __init of_ath9k_eeprom_init(void)
44 int ret = platform_driver_probe(&ath9k_eeprom_driver, of_ath9k_eeprom_probe);
47 - ath9k_eep_loaded = 1;
54 static int __init of_ath9k_eeprom_init_late(void)
56 - if (ath9k_eep_loaded)
57 + if (!ath9k_eep_load)
59 return platform_driver_probe(&ath9k_eeprom_driver, of_ath9k_eeprom_probe);
63 return platform_driver_probe(&ath5k_eeprom_driver, of_ath5k_eeprom_probe);
65 -device_initcall(of_ath5k_eeprom_init);
66 +subsys_initcall(of_ath5k_eeprom_init);