diff options
author | Alexander Gordeev <lasaine@lvk.cs.msu.su> | 2011-01-25 15:07:16 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-26 10:49:59 +1000 |
commit | cbeb4b7ad5346516d2ee726395eb5722b25a0a01 (patch) | |
tree | e9ac41dd3ec1bb14b52f6b9325cb2968f2799faf /drivers | |
parent | 0766d20fdb9178b908f0268c16b464c11822c5c2 (diff) | |
download | blackbird-obmc-linux-cbeb4b7ad5346516d2ee726395eb5722b25a0a01.tar.gz blackbird-obmc-linux-cbeb4b7ad5346516d2ee726395eb5722b25a0a01.zip |
parport: make lockdep happy with waitlist_lock
parport_unregister_device() should never be used when interrupts are
enabled in hardware and irq handler is registered so there is no need to
disable interrupts when using waitlist_lock. But there is no way to
explain this subtle semantics to lockdep analyzer.
So disable interrupts here too to simplify things. The price is
negligible.
Signed-off-by: Alexander Gordeev <lasaine@lvk.cs.msu.su>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/parport/share.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/parport/share.c b/drivers/parport/share.c index a2d9d1e59260..a848e02e6be3 100644 --- a/drivers/parport/share.c +++ b/drivers/parport/share.c @@ -678,7 +678,7 @@ void parport_unregister_device(struct pardevice *dev) /* Make sure we haven't left any pointers around in the wait * list. */ - spin_lock (&port->waitlist_lock); + spin_lock_irq(&port->waitlist_lock); if (dev->waitprev || dev->waitnext || port->waithead == dev) { if (dev->waitprev) dev->waitprev->waitnext = dev->waitnext; @@ -689,7 +689,7 @@ void parport_unregister_device(struct pardevice *dev) else port->waittail = dev->waitprev; } - spin_unlock (&port->waitlist_lock); + spin_unlock_irq(&port->waitlist_lock); kfree(dev->state); kfree(dev); |