aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/natsemi/sonic.h
diff options
context:
space:
mode:
authorThomas Gleixner2020-09-29 22:25:23 +0200
committerDavid S. Miller2020-09-29 14:02:54 -0700
commit606dbf8d5df129fd6b404f69c520e2d2feddc424 (patch)
tree041bcc77615316cb2b14d3c93bc9018a2d7fefd6 /drivers/net/ethernet/natsemi/sonic.h
parent85bdebd122febd881474b46034494a7cee3ca2b9 (diff)
net: natsemi: Replace in_interrupt() usage.
The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be seperated or the context be conveyed in an argument passed by the caller, which usually knows the context. sonic_quiesce() uses 'in_interrupt() || irqs_disabled()' to chose either udelay() or usleep_range() in the wait loop. In all callchains leading to it the context is well defined and known. Add a 'may_sleep' argument and pass it through the various callchains leading to this function. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/natsemi/sonic.h')
-rw-r--r--drivers/net/ethernet/natsemi/sonic.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/natsemi/sonic.h b/drivers/net/ethernet/natsemi/sonic.h
index 3cbb62c860c8..a5b803eb8c8a 100644
--- a/drivers/net/ethernet/natsemi/sonic.h
+++ b/drivers/net/ethernet/natsemi/sonic.h
@@ -338,7 +338,7 @@ static void sonic_rx(struct net_device *dev);
static int sonic_close(struct net_device *dev);
static struct net_device_stats *sonic_get_stats(struct net_device *dev);
static void sonic_multicast_list(struct net_device *dev);
-static int sonic_init(struct net_device *dev);
+static int sonic_init(struct net_device *dev, bool may_sleep);
static void sonic_tx_timeout(struct net_device *dev, unsigned int txqueue);
static void sonic_msg_init(struct net_device *dev);
static int sonic_alloc_descriptors(struct net_device *dev);