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
vt8500 pinctrl: vt8500: Change devicetree data parsing 2014-02-03 09:08:01 +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
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
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-ab8500.c
pinctrl-ab8505.c
pinctrl-ab8540.c
pinctrl-ab9540.c
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-adi2-bf60x.c
pinctrl-adi2.c
pinctrl-adi2.h
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.h
pinctrl-exynos5440.c
pinctrl-exynos.c
pinctrl-exynos.h
pinctrl-falcon.c
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-imx6q.c
pinctrl-imx6sl.c
pinctrl-imx23.c
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
pinctrl-imx35.c
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-imx53.c
pinctrl-imx.c pinctrl: imx: fix using pin->input_val wrongly 2013-11-04 13:04:26 +01:00
pinctrl-imx.h
pinctrl-lantiq.c
pinctrl-lantiq.h
pinctrl-msm8x74.c pinctrl-msm: Rename compatible to be more specific 2013-12-16 10:33:42 +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-mxs.c
pinctrl-mxs.h
pinctrl-nomadik-db8500.c
pinctrl-nomadik-db8540.c
pinctrl-nomadik-stn8815.c
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-rockchip.c pinctrl: rockchip: missing unlock on error in rockchip_set_pull() 2013-11-25 09:08:18 +01:00
pinctrl-s3c24xx.c
pinctrl-s3c64xx.c
pinctrl-samsung.c
pinctrl-samsung.h
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-tegra20.c
pinctrl-tegra30.c
pinctrl-tegra114.c
pinctrl-tegra124.c pinctrl: tegra: add pinmux controller driver for Tegra124 2013-12-12 22:28:06 +01:00
pinctrl-tegra.c pinctrl: tegra: return correct error type 2014-02-06 14:21:19 +01:00
pinctrl-tegra.h
pinctrl-tz1090-pdc.c
pinctrl-tz1090.c
pinctrl-u300.c
pinctrl-utils.c
pinctrl-utils.h
pinctrl-vf610.c
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