OSDN Git Service

pinctrl: rza1: Fix selector use for groups and functions
authorTony Lindgren <tony@atomide.com>
Thu, 5 Jul 2018 09:10:17 +0000 (02:10 -0700)
committerLinus Walleij <linus.walleij@linaro.org>
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 <hns@goldelico.com>
Cc: Christ van Willegen <cvwillegen@gmail.com>
Cc: Haojian Zhuang <haojian.zhuang@linaro.org>
Cc: Paul Cercueil <paul@crapouillou.net>
Cc: Sean Wang <sean.wang@mediatek.com>
Acked-by: Jacopo Mondi <jacopo@jmondi.org>
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-rza1.c