linux/drivers/pinctrl
Doug Anderson 0297ca701b 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:53:50 -07:00
..
mvebu pinctrl: mvebu: remove redundant of_match_ptr 2013-10-23 10:55:04 +02:00
sh-pfc pinctrl: sh-pfc: r8a7791: SD1_CLK fix 2014-03-05 09:57:47 +08:00
sirf pinctrl: sirf: fix kernel panic in gpio_lock_as_irq 2014-03-05 17:11:47 +08:00
spear pinctrl: remove redundant of_match_ptr 2013-10-08 10:02:25 +02:00
vt8500 pinctrl: vt8500: Change devicetree data parsing 2014-02-03 09:08:01 +01:00
Kconfig pinctrl: msm: make PINCTRL_MSM bool instead of tristate 2014-03-05 09:57:47 +08:00
Makefile ARM: pinctrl: Add Broadcom Capri pinctrl driver 2014-01-16 14:25:38 +01:00
core.c pinctrl: Don't just pretend to protect pinctrl_maps, do it for real 2015-05-17 09:53:50 -07:00
core.h pinctrl: Don't just pretend to protect pinctrl_maps, do it for real 2015-05-17 09:53:50 -07:00
devicetree.c pinctrl: Don't just pretend to protect pinctrl_maps, do it for real 2015-05-17 09:53:50 -07:00
devicetree.h pinctrl: core device tree mapping table parsing support 2012-04-18 13:53:10 +02:00
pinconf-generic.c pinctrl: Adds slew-rate, input-enable/disable 2013-12-16 10:55:03 +01:00
pinconf.c pinctrl: pinconf: remove warning: unused variable 'ops' 2013-12-13 13:55:15 +01:00
pinconf.h pinctrl: add function to parse generic pinconfig properties from a dt node 2013-06-16 11:57:32 +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 mfd/pinctrl: Delete platform data header 2014-01-21 08:27:42 +00:00
pinctrl-abx500.h mfd/pinctrl: Delete platform data header 2014-01-21 08:27:42 +00:00
pinctrl-adi2-bf54x.c pinctrl: ADI PIN control driver for the GPIO controller on bf54x and bf60x. 2013-09-19 14:37:27 +02:00
pinctrl-adi2-bf60x.c pinctrl: pinctrl-adi2-bf60x: remove useless and duplicated GPIO definition for PPI2. 2013-09-23 09:45:33 +02:00
pinctrl-adi2.c pinctrl: pinctrl-adi2: disable IRQ when setting value 2013-10-09 13:09:41 +02:00
pinctrl-adi2.h pinctrl: ADI PIN control driver for the GPIO controller on bf54x and bf60x. 2013-09-19 14:37:27 +02:00
pinctrl-as3722.c pinctrl: as3722: fix handling of GPIO invert bit 2014-05-13 13:32:54 +02:00
pinctrl-at91.c pinctrl: at91: use locked variant of irq_set_handler 2014-02-03 09:07:30 +01:00
pinctrl-baytrail.c pinctrl: baytrail: show output gpio state correctly on Intel Baytrail 2014-11-14 09:00:12 -08:00
pinctrl-bcm2835.c gpio/pinctrl: make gpio_chip members typed boolean 2013-12-04 14:42:46 +01:00
pinctrl-capri.c pinctrl: refer to updated dt binding string. 2014-02-24 20:25:54 -08:00
pinctrl-coh901.c pinctrl: coh901: mark GPIO lines used for IRQ 2013-10-16 09:59:55 +02:00
pinctrl-coh901.h pinctrl: support pinconfig on the U300 2012-03-12 22:49:03 +01:00
pinctrl-exynos.c pinctrl: Correct number of pins for s5pv210 2013-09-27 15:50:22 +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 pinctrl: remove redundant of_match_ptr 2013-10-08 10:02:25 +02:00
pinctrl-falcon.c pinctrl: Pass all configs to driver on pin_config_set() 2013-08-28 13:34:41 +02:00
pinctrl-imx.c pinctrl: imx: fix using pin->input_val wrongly 2013-11-04 13:04:26 +01:00
pinctrl-imx.h pinctrl: imx: Use struct type for pins 2013-08-16 14:43:56 +02:00
pinctrl-imx1-core.c pinctrl: imx27: fix offset calculation in imx_read_2bit 2014-02-03 09:08:09 +01:00
pinctrl-imx1.h pinctrl: imx1 core driver 2013-10-29 06:54:37 -07:00
pinctrl-imx6dl.c pinctrl: remove redundant of_match_ptr 2013-10-08 10:02:25 +02:00
pinctrl-imx6q.c pinctrl: remove redundant of_match_ptr 2013-10-08 10:02:25 +02:00
pinctrl-imx6sl.c pinctrl: remove redundant of_match_ptr 2013-10-08 10:02:25 +02:00
pinctrl-imx23.c Drivers: pinctrl: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
pinctrl-imx25.c pinctrl: pinctrl-imx: add imx25 pinctrl driver 2013-11-25 09:08:30 +01:00
pinctrl-imx27.c pinctrl: imx27: imx27 pincontrol driver 2013-10-29 08:58:06 -07:00
pinctrl-imx28.c Drivers: pinctrl: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
pinctrl-imx35.c pinctrl: remove redundant of_match_ptr 2013-10-08 10:02:25 +02:00
pinctrl-imx50.c pinctrl: imx50: add pinctrl support code for the IMX50 SoC 2013-11-06 10:06:59 +01:00
pinctrl-imx51.c pinctrl: remove redundant of_match_ptr 2013-10-08 10:02:25 +02:00
pinctrl-imx53.c pinctrl: remove redundant of_match_ptr 2013-10-08 10:02:25 +02: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-msm.c pinctrl: msm: Fix set gpio setting 2013-12-20 10:13:23 +01:00
pinctrl-msm.h pinctrl: Add Qualcomm TLMM driver 2013-12-06 14:58:33 +01:00
pinctrl-msm8x74.c pinctrl-msm: Rename compatible to be more specific 2013-12-16 10:33:42 +01:00
pinctrl-mxs.c pinctrl: Pass all configs to driver on pin_config_set() 2013-08-28 13:34:41 +02:00
pinctrl-mxs.h pinctrl: add pinctrl-mxs support 2012-05-02 01:18:27 +02:00
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: SoC DT updates for 3.14 2014-01-23 18:45:38 -08:00
pinctrl-nomadik.h pinctrl: nomadik: move platform data handling into driver 2013-11-26 21:01:58 +01:00
pinctrl-palmas.c pinctrl: palmas: remove pin config BIAS_PULL_PIN_DEFAULT support 2013-10-08 13:27:27 +02:00
pinctrl-rockchip.c pinctrl: rockchip: missing unlock on error in rockchip_set_pull() 2013-11-25 09:08:18 +01:00
pinctrl-s3c24xx.c pinctrl: s3c24xx: off by one in s3c24xx_eint_init() 2013-08-28 14:44:25 +02: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: remove redundant of_match_ptr 2013-10-08 10:02:25 +02:00
pinctrl-samsung.h pinctrl: Add s5pv210 support to pinctrl-exynos 2013-08-28 15:56:06 +02:00
pinctrl-single.c pinctrl: single: fix infinite loop caused by bad mask 2014-01-15 08:31:53 +01:00
pinctrl-st.c pinctrl: st: Fix a typo in probe 2014-01-15 13:59:51 +01:00
pinctrl-sunxi-pins.h pinctrl: sunxi: Add Allwinner A20 clock output pin functions 2014-01-08 10:46:28 +01:00
pinctrl-sunxi.c pinctrl: sunxi: Fix masking when setting irq type 2014-03-05 09:57:36 +08:00
pinctrl-sunxi.h pinctrl: sunxi: Fix interrupt register offset calculation 2014-03-05 09:57:42 +08:00
pinctrl-tb10x.c pinctrl: tb10x: use module_platform_driver to simplify the code 2013-10-23 10:46:00 +02:00
pinctrl-tegra.c pinctrl: tegra: return correct error type 2014-02-06 14:21:19 +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: tegra114: Remove MODULE_ALIAS 2013-09-19 14:35:24 +02:00
pinctrl-tegra124.c pinctrl: tegra: add pinmux controller driver for Tegra124 2013-12-12 22:28:06 +01:00
pinctrl-tz1090-pdc.c pinctrl: Pass all configs to driver on pin_config_set() 2013-08-28 13:34:41 +02:00
pinctrl-tz1090.c pinctrl: Pass all configs to driver on pin_config_set() 2013-08-28 13:34:41 +02:00
pinctrl-u300.c pinctrl: Pass all configs to driver on pin_config_set() 2013-08-28 13:34:41 +02:00
pinctrl-utils.c pinctrl: utils: include export.h to avoid warnings 2013-08-28 15:50:33 +02:00
pinctrl-utils.h pinctrl: add utility functions for add map/configs 2013-08-14 21:00:41 +02:00
pinctrl-vf610.c pinctrl: remove redundant of_match_ptr 2013-10-08 10:02:25 +02:00
pinctrl-xway.c pinctrl/lantiq: fix typo 2014-01-08 10:13:38 +01:00
pinmux.c pinctrl: remove minor dead code 2013-11-04 13:07:05 +01:00
pinmux.h pinctrl: ifdef CONFIG_DEBUG_FS cleanup 2012-04-18 13:53:12 +02:00