Merge remote-tracking branch 'iommu/next'
[deliverable/linux.git] / drivers / net / ethernet / hisilicon / hns / hns_dsaf_mac.c
index 5c8afe1a5ccb1d35c0e545c92212e3b7c2428ac9..a68eef0ee65ffa62b4eb8d6f0822ee16e8ed2fb2 100644 (file)
@@ -644,21 +644,6 @@ hns_mac_phy_parse_addr(struct device *dev, struct fwnode_handle *fwnode)
        return addr;
 }
 
-static int hns_mac_phydev_match(struct device *dev, void *fwnode)
-{
-       return dev->fwnode == fwnode;
-}
-
-static struct
-platform_device *hns_mac_find_platform_device(struct fwnode_handle *fwnode)
-{
-       struct device *dev;
-
-       dev = bus_find_device(&platform_bus_type, NULL,
-                             fwnode, hns_mac_phydev_match);
-       return dev ? to_platform_device(dev) : NULL;
-}
-
 static int
 hns_mac_register_phydev(struct mii_bus *mdio, struct hns_mac_cb *mac_cb,
                        u32 addr)
@@ -684,8 +669,7 @@ hns_mac_register_phydev(struct mii_bus *mdio, struct hns_mac_cb *mac_cb,
        if (!phy || IS_ERR(phy))
                return -EIO;
 
-       if (mdio->irq)
-               phy->irq = mdio->irq[addr];
+       phy->irq = mdio->irq[addr];
 
        /* All data is now stored in the phy struct;
         * register it
@@ -725,7 +709,7 @@ static void hns_mac_register_phy(struct hns_mac_cb *mac_cb)
                return;
 
        /* dev address in adev */
-       pdev = hns_mac_find_platform_device(acpi_fwnode_handle(args.adev));
+       pdev = hns_dsaf_find_platform_device(acpi_fwnode_handle(args.adev));
        mii_bus = platform_get_drvdata(pdev);
        rc = hns_mac_register_phydev(mii_bus, mac_cb, addr);
        if (!rc)
This page took 0.026561 seconds and 5 git commands to generate.