OSDN Git Service

net: fec_mpc52xx: Replace in_interrupt() usage
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Tue, 29 Sep 2020 20:25:18 +0000 (22:25 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Sep 2020 21:02:54 +0000 (14:02 -0700)
commitc35a0824e88bf444c978080ef7698bcf73f44c20
treeec81a04c38a8578b7a9bd98f39e6e017c30510d3
parentf127bab4fa2083218fc549c7aef6768de7eb871f
net: fec_mpc52xx: 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.

mpc52xx_fec_stop() uses in_interrupt() to check if it is safe to sleep. All
callers run in well defined contexts.

Pass an argument from the callers indicating whether it is safe to sleep.

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>
drivers/net/ethernet/freescale/fec_mpc52xx.c