]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: single: Fix group and function selector use
authorTony Lindgren <tony@atomide.com>
Thu, 5 Jul 2018 09:10:16 +0000 (02:10 -0700)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 17 Jul 2018 08:49:10 +0000 (10:49 +0200)
commitc6046701465f30f486d324d1afc1985b91192a20
tree58fe55dd8f4b02cb46957867478e6afae06b6839
parent1b849f28065933a110ace121fd1b640b5117c670
pinctrl: single: Fix group and function selector use

We must use a mutex around the generic_add functions and save the
function and group selector in case we need to remove them. Otherwise
the selector use will be racy for deferred probe at least.

Note that struct device_node *np is unused in pcs_add_function() we
remove that too and fix a checkpatch warning for bare unsigned while
at it.

Fixes: 0b0e8d9367ac ("pinctrl: single: Use generic pinmux helpers for
managing functions")
Reported-by: H. Nikolaus Schaller <hns@goldelico.com>
Cc: Christ van Willegen <cvwillegen@gmail.com>
Cc: Haojian Zhuang <haojian.zhuang@linaro.org>
Cc: Jacopo Mondi <jacopo+renesas@jmondi.org>
Cc: Paul Cercueil <paul@crapouillou.net>
Cc: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Tested-By: H. Nikolaus Schaller <hns@goldelico.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-single.c