net: bcmgenet: Drop useless OF code
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 20 Apr 2020 21:51:18 +0000 (00:51 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Apr 2020 23:24:53 +0000 (16:24 -0700)
There is nothing which needs a set of OF headers, followed by redundant
OF node ID check. Drop them for good.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/genet/bcmgenet.c

index 9f2f0e6..ef275db 100644 (file)
 #include <linux/dma-mapping.h>
 #include <linux/pm.h>
 #include <linux/clk.h>
-#include <linux/of.h>
-#include <linux/of_address.h>
-#include <linux/of_irq.h>
-#include <linux/of_net.h>
-#include <linux/of_platform.h>
 #include <net/arp.h>
 
 #include <linux/mii.h>
@@ -3417,8 +3412,6 @@ MODULE_DEVICE_TABLE(of, bcmgenet_match);
 static int bcmgenet_probe(struct platform_device *pdev)
 {
        struct bcmgenet_platform_data *pd = pdev->dev.platform_data;
-       struct device_node *dn = pdev->dev.of_node;
-       const struct of_device_id *of_id = NULL;
        const struct bcmgenet_plat_data *pdata;
        struct bcmgenet_priv *priv;
        struct net_device *dev;
@@ -3433,12 +3426,6 @@ static int bcmgenet_probe(struct platform_device *pdev)
                return -ENOMEM;
        }
 
-       if (dn) {
-               of_id = of_match_node(bcmgenet_match, dn);
-               if (!of_id)
-                       return -EINVAL;
-       }
-
        priv = netdev_priv(dev);
        priv->irq0 = platform_get_irq(pdev, 0);
        if (priv->irq0 < 0) {