greybus: Revert "greybus: es2.c: don't use spin_lock_irq()"
authorJohan Hovold <johan@hovoldconsulting.com>
Mon, 27 Jun 2016 18:07:11 +0000 (20:07 +0200)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 29 Jun 2016 23:37:17 +0000 (16:37 -0700)
commit07af934094ed7d79442dcec82305001e3a66ad6c
tree10ca49bdfd1a4478cade3ca7955b2dbeb0a5c67f
parent0b1d262354214daab1a3b7df763dc51c355ec353
greybus: Revert "greybus: es2.c: don't use spin_lock_irq()"

This reverts commit b44c3b5b0307788750eb4c462ed5982236876a8b.

Someone decided that all use of spin_lock_irq was to be considered a bug
and went on a search-and-replace type "bug-fixing" spree last week.

This is however just plain wrong. Using spin_lock_irq is perfectly fine
in paths were interrupts have not been disabled, and this is in fact
even preferred over the lazy approach of always using spin_lock_irqsave
instead of understanding the code that is being written or modified.

All current uses of spin_lock_irq have already been vetted in this
respect. Also note that it is only used in functions that may sleep,
that is, in functions that must not be called with interrupts disabled
in the first place.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/es2.c