ftgmac100: Remove "enabled" flags
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 5 Apr 2017 02:28:44 +0000 (12:28 +1000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Apr 2017 19:38:04 +0000 (12:38 -0700)
It's not used in any meaningful way

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/faraday/ftgmac100.c

index 89148246a7390bcd449b3c000588adee7ccc2578..283edb1a7f7aff1d682a6adf38a306797831459d 100644 (file)
@@ -84,7 +84,6 @@ struct ftgmac100 {
 
        /* Misc */
        int int_mask_all;
-       bool enabled;
 };
 
 static int ftgmac100_alloc_rx_page(struct ftgmac100 *priv,
@@ -1126,8 +1125,6 @@ static int ftgmac100_open(struct net_device *netdev)
                        goto err_ncsi;
        }
 
-       priv->enabled = true;
-
        return 0;
 
 err_ncsi:
@@ -1146,11 +1143,7 @@ static int ftgmac100_stop(struct net_device *netdev)
 {
        struct ftgmac100 *priv = netdev_priv(netdev);
 
-       if (!priv->enabled)
-               return 0;
-
        /* disable all interrupts */
-       priv->enabled = false;
        iowrite32(0, priv->base + FTGMAC100_OFFSET_IER);
 
        netif_stop_queue(netdev);