diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2013-08-04 12:38:48 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@stericsson.com> | 2013-08-07 21:57:17 +0200 |
commit | 1bee963db9dd82e12566bdae6710defb1206b38b (patch) | |
tree | b3813fe68073ac24812489252faf3c93fd508deb /drivers/pinctrl/pinctrl-sunxi.h | |
parent | df7b34f4c3d23f25b408d4c0d7f528092becce63 (diff) |
pinctrl: sunxi: Add spinlocks
The current code use no locking at all, which is obviously not that
great and can lead to concurrency issues, especially with the newer SMP
SoCs from Allwinner.
Add some locking where it's needed.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Diffstat (limited to 'drivers/pinctrl/pinctrl-sunxi.h')
-rw-r--r-- | drivers/pinctrl/pinctrl-sunxi.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-sunxi.h b/drivers/pinctrl/pinctrl-sunxi.h index d68047d8f69..01c494f8a14 100644 --- a/drivers/pinctrl/pinctrl-sunxi.h +++ b/drivers/pinctrl/pinctrl-sunxi.h @@ -14,6 +14,7 @@ #define __PINCTRL_SUNXI_H #include <linux/kernel.h> +#include <linux/spinlock.h> #define PA_BASE 0 #define PB_BASE 32 @@ -407,6 +408,7 @@ struct sunxi_pinctrl { unsigned ngroups; int irq; int irq_array[SUNXI_IRQ_NUMBER]; + spinlock_t lock; struct pinctrl_dev *pctl_dev; }; |