diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-02-08 17:31:39 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-02-08 17:31:39 -0500 |
commit | 494479038d97f1b9f76fc633a360a681acdf035c (patch) | |
tree | da588d74320417838c15d93d568050dbe0c1f4ef /drivers/pinctrl/core.c | |
parent | c132adef53739d9911326fc308d34045a0ea5446 (diff) | |
parent | 5b232c5addc02980cfce451575f1d1f975bdb04e (diff) |
Merge tag 'pinctrl-v3.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
Pull pinctrl fixes from Linus Walleij:
"First round of pin control fixes for v3.14:
- Protect pinctrl_list_add() with the proper mutex. This was
identified by RedHat. Caused nasty locking warnings was rootcased
by Stanislaw Gruszka.
- Avoid adding dangerous debugfs files when either half of the
subsystem is unused: pinmux or pinconf.
- Various fixes to various drivers: locking, hardware particulars, DT
parsing, error codes"
* tag 'pinctrl-v3.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
pinctrl: tegra: return correct error type
pinctrl: do not init debugfs entries for unimplemented functionalities
pinctrl: protect pinctrl_list add
pinctrl: sirf: correct the pin index of ac97_pins group
pinctrl: imx27: fix offset calculation in imx_read_2bit
pinctrl: vt8500: Change devicetree data parsing
pinctrl: imx27: fix wrong offset to ICONFB
pinctrl: at91: use locked variant of irq_set_handler
Diffstat (limited to 'drivers/pinctrl/core.c')
-rw-r--r-- | drivers/pinctrl/core.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 5ee61a470016..c0fe6091566a 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c | |||
@@ -851,7 +851,9 @@ static struct pinctrl *create_pinctrl(struct device *dev) | |||
851 | kref_init(&p->users); | 851 | kref_init(&p->users); |
852 | 852 | ||
853 | /* Add the pinctrl handle to the global list */ | 853 | /* Add the pinctrl handle to the global list */ |
854 | mutex_lock(&pinctrl_list_mutex); | ||
854 | list_add_tail(&p->node, &pinctrl_list); | 855 | list_add_tail(&p->node, &pinctrl_list); |
856 | mutex_unlock(&pinctrl_list_mutex); | ||
855 | 857 | ||
856 | return p; | 858 | return p; |
857 | } | 859 | } |
@@ -1642,8 +1644,10 @@ static void pinctrl_init_device_debugfs(struct pinctrl_dev *pctldev) | |||
1642 | device_root, pctldev, &pinctrl_groups_ops); | 1644 | device_root, pctldev, &pinctrl_groups_ops); |
1643 | debugfs_create_file("gpio-ranges", S_IFREG | S_IRUGO, | 1645 | debugfs_create_file("gpio-ranges", S_IFREG | S_IRUGO, |
1644 | device_root, pctldev, &pinctrl_gpioranges_ops); | 1646 | device_root, pctldev, &pinctrl_gpioranges_ops); |
1645 | pinmux_init_device_debugfs(device_root, pctldev); | 1647 | if (pctldev->desc->pmxops) |
1646 | pinconf_init_device_debugfs(device_root, pctldev); | 1648 | pinmux_init_device_debugfs(device_root, pctldev); |
1649 | if (pctldev->desc->confops) | ||
1650 | pinconf_init_device_debugfs(device_root, pctldev); | ||
1647 | } | 1651 | } |
1648 | 1652 | ||
1649 | static void pinctrl_remove_device_debugfs(struct pinctrl_dev *pctldev) | 1653 | static void pinctrl_remove_device_debugfs(struct pinctrl_dev *pctldev) |