ar71xx: fix mii bus irq assignment
authorFelix Fietkau <nbd@nbd.name>
Sat, 3 Mar 2018 11:23:51 +0000 (12:23 +0100)
committerFelix Fietkau <nbd@nbd.name>
Sun, 4 Mar 2018 18:37:20 +0000 (19:37 +0100)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h
target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_mdio.c

index 35318fb7138565a997a8fe976c169bed5765b2c5..77ee5b36ecbe27d414e20035ab194c9ab9604a2e 100644 (file)
@@ -116,7 +116,9 @@ struct ag71xx_ring {
 
 struct ag71xx_mdio {
        struct mii_bus          *mii_bus;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,5,0)
        int                     mii_irq[PHY_MAX_ADDR];
+#endif
        void __iomem            *mdio_base;
        struct ag71xx_mdio_platform_data *pdata;
 };
index 2915476569c5c7fba1558d6fa7fab521f2b37f60..cf41aa8a3f644cdf678cf7fc734d50c9309ce4ae 100644 (file)
@@ -256,8 +256,6 @@ static int ag71xx_mdio_probe(struct platform_device *pdev)
        am->mii_bus->reset = ag71xx_mdio_reset;
 #if LINUX_VERSION_CODE < KERNEL_VERSION(4,5,0)
        am->mii_bus->irq = am->mii_irq;
-#else
-       memcpy(am->mii_bus->irq, am->mii_irq, sizeof(am->mii_bus->irq));
 #endif
        am->mii_bus->priv = am;
        am->mii_bus->parent = &pdev->dev;
@@ -265,7 +263,7 @@ static int ag71xx_mdio_probe(struct platform_device *pdev)
        am->mii_bus->phy_mask = pdata->phy_mask;
 
        for (i = 0; i < PHY_MAX_ADDR; i++)
-               am->mii_irq[i] = PHY_POLL;
+               am->mii_bus->irq[i] = PHY_POLL;
 
        ag71xx_mdio_wr(am, AG71XX_REG_MAC_CFG1, 0);