net: ethernet: ti: cpsw: don't disable interrupts in ndo_open
authorIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Thu, 19 Jan 2017 16:58:24 +0000 (18:58 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Jan 2017 17:35:09 +0000 (12:35 -0500)
No need to disable interrupts if no open devices,
they are disabled anyway.

Even no need to disable interrupts if some ndev is opened, In this
case shared resources are not touched, only parameters of ndev shell,
so no reason to disable them also. Removed lines have proved it.

So, no need in redundant check and interrupt disable.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpsw.c

index 296ddf247e92c1e49c6d2acb6f863763102a376c..f79890546d96d1391d05147bc06fd1f968f320de 100644 (file)
@@ -1480,8 +1480,6 @@ static int cpsw_ndo_open(struct net_device *ndev)
                return ret;
        }
 
-       if (!cpsw_common_res_usage_state(cpsw))
-               cpsw_intr_disable(cpsw);
        netif_carrier_off(ndev);
 
        /* Notify the stack of the actual queue counts. */