pinctrl: rza1: Fix selector use for groups and functions
authorTony Lindgren <[email protected]>
Thu, 5 Jul 2018 09:10:17 +0000 (02:10 -0700)
committerLinus Walleij <[email protected]>
Tue, 17 Jul 2018 08:49:33 +0000 (10:49 +0200)
commitdc4003d260594aa300028c3c5d040c5719abd19b
tree6eeb13973cdebe110ca9d26fc046c90cdeb841df
parenta4ab1086072365235864151bca57230afa8bcc93
pinctrl: rza1: Fix selector use for groups and functions

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.

Fixes: 5a49b644b307 ("pinctrl: Renesas RZ/A1 pin and gpio controller")
Reported-by: H. Nikolaus Schaller <[email protected]>
Cc: Christ van Willegen <[email protected]>
Cc: Haojian Zhuang <[email protected]>
Cc: Paul Cercueil <[email protected]>
Cc: Sean Wang <[email protected]>
Acked-by: Jacopo Mondi <[email protected]>
Signed-off-by: Tony Lindgren <[email protected]>
Tested-By: H. Nikolaus Schaller <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
drivers/pinctrl/pinctrl-rza1.c