plip: replace spin_lock_irq with spin_lock_irqsave in irq context

Plip uses spin_lock_irq/spin_unlock_irq in its IRQ handler (called from
parport IRQ handler), the latter enables interrupts without parport
subsystem IRQ handler expecting it.

The bug can be seen if you compile kernel with lock dependency checking
and use plip --- it produces a warning.

This patch changes it to spin_lock_irqsave/spin_lock_irqrestore, so that
it doesn't enable interrupts when already disabled.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by Mikulas Patocka and committed by Linus Torvalds cabce28e a9edadbf

+4 -3
+4 -3
drivers/net/plip.c
··· 903 903 struct net_local *nl; 904 904 struct plip_local *rcv; 905 905 unsigned char c0; 906 + unsigned long flags; 906 907 907 908 nl = netdev_priv(dev); 908 909 rcv = &nl->rcv_data; 909 910 910 - spin_lock_irq (&nl->lock); 911 + spin_lock_irqsave (&nl->lock, flags); 911 912 912 913 c0 = read_status(dev); 913 914 if ((c0 & 0xf8) != 0xc0) { 914 915 if ((dev->irq != -1) && (net_debug > 1)) 915 916 printk(KERN_DEBUG "%s: spurious interrupt\n", dev->name); 916 - spin_unlock_irq (&nl->lock); 917 + spin_unlock_irqrestore (&nl->lock, flags); 917 918 return; 918 919 } 919 920 ··· 943 942 break; 944 943 } 945 944 946 - spin_unlock_irq(&nl->lock); 945 + spin_unlock_irqrestore(&nl->lock, flags); 947 946 } 948 947 949 948 static int