summaryrefslogtreecommitdiff
path: root/arch/mips/ath79/mach-ubnt-xm.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/ath79/mach-ubnt-xm.c')
-rw-r--r--arch/mips/ath79/mach-ubnt-xm.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/mips/ath79/mach-ubnt-xm.c b/arch/mips/ath79/mach-ubnt-xm.c
index 1e6b986cb470..ca47ba57a206 100644
--- a/arch/mips/ath79/mach-ubnt-xm.c
+++ b/arch/mips/ath79/mach-ubnt-xm.c
@@ -85,16 +85,27 @@ static struct ath9k_platform_data ubnt_xm_eeprom_data;
static struct ar724x_pci_data ubnt_xm_pci_data[] = {
{
.irq = ATH79_PCI_IRQ(0),
- .pdata = &ubnt_xm_eeprom_data,
},
};
+static int ubnt_xm_pci_plat_dev_init(struct pci_dev *dev)
+{
+ switch (PCI_SLOT(dev->devfn)) {
+ case 0:
+ dev->dev.platform_data = &ubnt_xm_eeprom_data;
+ break;
+ }
+
+ return 0;
+}
+
static void __init ubnt_xm_pci_init(void)
{
memcpy(ubnt_xm_eeprom_data.eeprom_data, UBNT_XM_EEPROM_ADDR,
sizeof(ubnt_xm_eeprom_data.eeprom_data));
ar724x_pci_add_data(ubnt_xm_pci_data, ARRAY_SIZE(ubnt_xm_pci_data));
+ ath79_pci_set_plat_dev_init(ubnt_xm_pci_plat_dev_init);
ath79_register_pci();
}
#else