usb: atm: Replace in_interrupt() usage in comment
authorThomas Gleixner <tglx@linutronix.de>
Mon, 19 Oct 2020 10:06:42 +0000 (12:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Oct 2020 11:31:39 +0000 (12:31 +0100)
in_interrupt() is a pretty vague context description as it means: hard
interrupt, soft interrupt or bottom half disabled regions.

Replace the vague comment with a proper reasoning why spin_lock_irqsave()
needs to be used.

Signed-off-by: Ahmed S. Darwish <a.darwish@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Duncan Sands <duncan.sands@free.fr>
Cc: linux-usb@vger.kernel.org
Link: https://lore.kernel.org/r/20201019101110.944939915@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/atm/usbatm.c

index 56fe30d247dad49b326a3a44b5d2606a298c3bad..f49792f951ab649bbb812ecdb2480ccffcb44e7d 100644 (file)
@@ -249,7 +249,7 @@ static void usbatm_complete(struct urb *urb)
        /* vdbg("%s: urb 0x%p, status %d, actual_length %d",
             __func__, urb, status, urb->actual_length); */
 
-       /* usually in_interrupt(), but not always */
+       /* Can be invoked from task context, protect against interrupts */
        spin_lock_irqsave(&channel->lock, flags);
 
        /* must add to the back when receiving; doesn't matter when sending */