linux-uconsole/drivers/pinctrl
Doug Anderson a854bc6146 pinctrl: Don't just pretend to protect pinctrl_maps, do it for real
commit c5272a2856 upstream.

Way back, when the world was a simpler place and there was no war, no
evil, and no kernel bugs, there was just a single pinctrl lock.  That
was how the world was when (57291ce pinctrl: core device tree mapping
table parsing support) was written.  In that case, there were
instances where the pinctrl mutex was already held when
pinctrl_register_map() was called, hence a "locked" parameter was
passed to the function to indicate that the mutex was already locked
(so we shouldn't lock it again).

A few years ago in (42fed7b pinctrl: move subsystem mutex to
pinctrl_dev struct), we switched to a separate pinctrl_maps_mutex.
...but (oops) we forgot to re-think about the whole "locked" parameter
for pinctrl_register_map().  Basically the "locked" parameter appears
to still refer to whether the bigger pinctrl_dev mutex is locked, but
we're using it to skip locks of our (now separate) pinctrl_maps_mutex.

That's kind of a bad thing(TM).  Probably nobody noticed because most
of the calls to pinctrl_register_map happen at boot time and we've got
synchronous device probing.  ...and even cases where we're
asynchronous don't end up actually hitting the race too often.  ...but
after banging my head against the wall for a bug that reproduced 1 out
of 1000 reboots and lots of looking through kgdb, I finally noticed
this.

Anyway, we can now safely remove the "locked" parameter and go back to
a war-free, evil-free, and kernel-bug-free world.

Fixes: 42fed7ba44 ("pinctrl: move subsystem mutex to pinctrl_dev struct")
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-17 09:51:33 -07:00
..
mvebu pinctrl: dove: unset twsi option3 for gconfig as well 2013-12-04 10:55:49 -08:00
sh-pfc sh-pfc: r8a7779: Don't group USB OVC and PENC pins 2013-06-04 14:37:43 +09:00
spear Two fixes to the pinctrl subsystem for v3.10: 2013-05-02 14:42:46 -07:00
vt8500 pinctrl: vt8500: Change devicetree data parsing 2014-02-20 11:06:11 -08:00
core.c pinctrl: Don't just pretend to protect pinctrl_maps, do it for real 2015-05-17 09:51:33 -07:00
core.h pinctrl: Don't just pretend to protect pinctrl_maps, do it for real 2015-05-17 09:51:33 -07:00
devicetree.c pinctrl: Don't just pretend to protect pinctrl_maps, do it for real 2015-05-17 09:51:33 -07:00
devicetree.h
Kconfig ARM: arm-soc driver changes for 3.10 2013-05-04 12:31:18 -07:00
Makefile ARM: arm-soc driver changes for 3.10 2013-05-04 12:31:18 -07:00
pinconf-generic.c pinctrl: generic: Fix checkpatch errors 2013-03-27 22:49:13 +01:00
pinconf.c pinctrl: pinconf: take the right mutex 2013-05-27 15:53:32 +02:00
pinconf.h Linux 3.9-rc5 2013-04-03 22:18:36 +02:00
pinctrl-ab8500.c pinctrl: ab8500: Staticize some symbols 2013-04-09 09:54:00 +02:00
pinctrl-ab8505.c pinctrl: ab8505: Staticize some symbols 2013-04-09 09:59:42 +02:00
pinctrl-ab8540.c pinctrl: ab8540: Staticize some symbols 2013-04-09 09:58:02 +02:00
pinctrl-ab9540.c pinctrl: ab9540: Staticize some symbols 2013-04-09 09:55:59 +02:00
pinctrl-abx500.c pinctrl: abx500: Rejiggle platform data and DT initialisation 2013-05-14 13:07:49 +02:00
pinctrl-abx500.h pinctrl/abx500: replace IRQ offsets with table read-in values 2013-02-10 15:44:33 +01:00
pinctrl-at91.c pinctrl: at91: fix get_pullup/down function return 2013-09-26 17:18:14 -07:00
pinctrl-bcm2835.c ARM: arm-soc driver changes for 3.10 2013-05-04 12:31:18 -07:00
pinctrl-coh901.c pinctrl: Don't override the error code in probe error handling 2013-05-27 15:37:08 +02:00
pinctrl-coh901.h
pinctrl-exynos.c pinctrl: exynos: Handle suspend/resume of GPIO EINT registers 2013-05-27 15:37:09 +02:00
pinctrl-exynos.h pinctrl: exynos: Handle suspend/resume of GPIO EINT registers 2013-05-27 15:37:09 +02:00
pinctrl-exynos5440.c drivers/pinctrl: don't check resource with devm_ioremap_resource 2013-05-18 11:55:56 +02:00
pinctrl-falcon.c pinctrl: Declare operation structures as const 2013-03-07 05:27:29 +01:00
pinctrl-imx.c ARM: arm-soc device-tree updates for 3.10, part 1 2013-05-02 09:28:03 -07:00
pinctrl-imx.h pinctrl: imx: move hard-coding data into device tree 2013-04-09 22:52:50 +08:00
pinctrl-imx6dl.c pinctrl: add pinctrl driver for imx6dl 2013-04-09 22:53:38 +08:00
pinctrl-imx6q.c pinctrl: imx: move hard-coding data into device tree 2013-04-09 22:52:50 +08:00
pinctrl-imx6sl.c pinctrl: add pinctrl driver for imx6sl 2013-04-09 22:53:38 +08:00
pinctrl-imx23.c Drivers: pinctrl: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
pinctrl-imx28.c Drivers: pinctrl: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
pinctrl-imx35.c pinctrl: imx: move hard-coding data into device tree 2013-04-09 22:52:50 +08:00
pinctrl-imx51.c pinctrl: imx: move hard-coding data into device tree 2013-04-09 22:52:50 +08:00
pinctrl-imx53.c pinctrl: imx: move hard-coding data into device tree 2013-04-09 22:52:50 +08:00
pinctrl-lantiq.c pinctrl/lantiq: Free mapping configs for both pin and groups 2013-05-15 13:28:46 +02:00
pinctrl-lantiq.h pinctrl/lantiq: add output pinconf parameter 2013-02-05 16:17:22 +01:00
pinctrl-mxs.c pinctrl: Declare operation structures as const 2013-03-07 05:27:29 +01:00
pinctrl-mxs.h
pinctrl-nomadik-db8500.c pinctrl/nomadik-db8500: Fix checkpatch errors 2013-03-27 22:21:32 +01:00
pinctrl-nomadik-db8540.c Drivers: pinctrl: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
pinctrl-nomadik-stn8815.c pinctrl: pinctrl-nomadik-stn8815: Fix checkpatch error 2013-03-13 19:50:20 +01:00
pinctrl-nomadik.c ARM: arm-soc cleanup for 3.10 2013-05-02 09:03:55 -07:00
pinctrl-nomadik.h pinctrl/nomadik: move the platform data header 2012-11-05 09:55:27 +01:00
pinctrl-s3c64xx.c pinctrl: s3c64xx: Fix build error caused by undefined chained_irq_enter 2013-04-23 13:59:45 +02:00
pinctrl-samsung.c pinctrl: samsung: Add support for SoC-specific suspend/resume callbacks 2013-05-27 15:37:08 +02:00
pinctrl-samsung.h pinctrl: samsung: Allow per-bank SoC-specific private data 2013-05-27 15:37:09 +02:00
pinctrl-single.c pinctrl: single: fix error return code in pcs_parse_one_pinctrl_entry() 2013-05-14 14:04:14 +02:00
pinctrl-sirf.c ARM: arm-soc multiplatform updates for 3.10 2013-05-02 09:38:16 -07:00
pinctrl-sunxi.c pinctrl: sunxi: Honor GPIO output initial vaules 2014-02-06 11:08:15 -08:00
pinctrl-sunxi.h ARM: pinctrl: sunxi: Add the pinctrl pin set for Allwinner A10 2013-02-01 10:45:34 +01:00
pinctrl-tegra.c pinctrl: Declare operation structures as const 2013-03-07 05:27:29 +01:00
pinctrl-tegra.h pinctrl: tegra: add support for rcv-sel and drive type 2013-01-18 16:13:52 +01:00
pinctrl-tegra20.c pinctrl: tegra: add support for rcv-sel and drive type 2013-01-18 16:13:52 +01:00
pinctrl-tegra30.c pinctrl: tegra: add support for rcv-sel and drive type 2013-01-18 16:13:52 +01:00
pinctrl-tegra114.c pinctrl: tegra: add clfvs function to Tegra114 support 2013-02-15 20:22:39 +01:00
pinctrl-u300.c pinctrl: Declare operation structures as const 2013-03-07 05:27:29 +01:00
pinctrl-xway.c drivers/pinctrl: don't check resource with devm_ioremap_resource 2013-05-18 11:55:56 +02:00
pinmux.c pinctrl: move subsystem mutex to pinctrl_dev struct 2013-04-26 17:01:35 +02:00
pinmux.h