diff options
author | Eduardo Valentin <eduardo.valentin@ti.com> | 2013-03-15 09:00:35 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-15 09:02:24 -0700 |
commit | ebf0bd52e657b41341bbfb0cbaabc308bf1c58e9 (patch) | |
tree | 59d0f6108e99b9ee416cefe869fa13fc55684cf4 /drivers/staging/omap-thermal/omap-bandgap.h | |
parent | staging: omap-thermal: Add a MAINTAINERS entry for TI bandgap and thermal driver (diff) | |
download | linux-dev-ebf0bd52e657b41341bbfb0cbaabc308bf1c58e9.tar.xz linux-dev-ebf0bd52e657b41341bbfb0cbaabc308bf1c58e9.zip |
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>
Diffstat (limited to 'drivers/staging/omap-thermal/omap-bandgap.h')
-rw-r--r-- | drivers/staging/omap-thermal/omap-bandgap.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/omap-thermal/omap-bandgap.h b/drivers/staging/omap-thermal/omap-bandgap.h index edcc9652d53f..57005862d4f9 100644 --- a/drivers/staging/omap-thermal/omap-bandgap.h +++ b/drivers/staging/omap-thermal/omap-bandgap.h @@ -23,7 +23,7 @@ #ifndef __OMAP_BANDGAP_H #define __OMAP_BANDGAP_H -#include <linux/mutex.h> +#include <linux/spinlock.h> #include <linux/types.h> #include <linux/err.h> @@ -211,7 +211,7 @@ struct omap_bandgap { struct omap_bandgap_data *conf; struct clk *fclock; struct clk *div_clk; - struct mutex bg_mutex; /* shields this struct */ + spinlock_t lock; /* shields this struct */ int irq; int tshut_gpio; u32 clk_rate; |