staging: omap-thermal: switch mutex to spinlock inside omap-bandgap
authorEduardo Valentin <eduardo.valentin@ti.com>
Fri, 15 Mar 2013 13:00:35 +0000 (09:00 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Mar 2013 16:02:24 +0000 (09:02 -0700)
commitebf0bd52e657b41341bbfb0cbaabc308bf1c58e9
tree59d0f6108e99b9ee416cefe869fa13fc55684cf4
parent1b46f2a239bfa3452179c8f1783f41ad1ff1833c
staging: omap-thermal: switch mutex to spinlock inside omap-bandgap

Because there is a need to lock inside IRQ handler, this patch
changes the locking mechanism inside the omap-bandgap.[c,h] to
spinlocks. Now this lock is used to protect omap_bandgap struct
during APIs exposed (possibly used in sysfs handling functions)
and inside the ALERT IRQ handler.

Because there are registers shared among the sensors, this lock
is global, not per sensor.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/omap-thermal/TODO
drivers/staging/omap-thermal/omap-bandgap.c
drivers/staging/omap-thermal/omap-bandgap.h