Slight cleanup and avoids a temporary variable.

Based on upstream commit.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 .../files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c    | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git 
a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c 
b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index a5704b0f1b..6999635ad7 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -1523,7 +1523,6 @@ static void fe_pending_work(struct work_struct *work)
 static int fe_probe(struct platform_device *pdev)
 {
        struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       const struct of_device_id *match;
        struct fe_soc_data *soc;
        struct net_device *netdev;
        struct fe_priv *priv;
@@ -1532,8 +1531,7 @@ static int fe_probe(struct platform_device *pdev)
 
        device_reset(&pdev->dev);
 
-       match = of_match_device(of_fe_match, &pdev->dev);
-       soc = (struct fe_soc_data *)match->data;
+       soc = of_device_get_match_data(&pdev->dev);
 
        if (soc->reg_table)
                fe_reg_table = soc->reg_table;
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to