diff options
author | Saravana Kannan <saravanak@google.com> | 2022-07-26 18:33:48 -0700 |
---|---|---|
committer | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2022-08-16 12:23:30 +0300 |
commit | 152a81a0b1204e9c7f4af0004b5ed7a8d67dd037 (patch) | |
tree | 4d1eab06531bb856bd7024d0e8211220b623573a /drivers/pinctrl/samsung/pinctrl-samsung.c | |
parent | 568035b01cfb107af8d2e4bd2fb9aea22cf5b868 (diff) | |
download | linux-152a81a0b1204e9c7f4af0004b5ed7a8d67dd037.tar.gz linux-152a81a0b1204e9c7f4af0004b5ed7a8d67dd037.tar.bz2 linux-152a81a0b1204e9c7f4af0004b5ed7a8d67dd037.zip |
pinctrl: samsung: Finish initializing the gpios before registering them
As soon as a gpio is registered, it should be usable by a consumer. So,
do all the initialization before registering the gpios. Without this
change, a consumer can request a GPIO IRQ and have the gpio to IRQ
mapping fail.
Signed-off-by: Saravana Kannan <saravanak@google.com>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Chanho Park <chanho61.park@samsung.com>
Tested-by: Chanho Park <chanho61.park@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220727013349.3056826-1-saravanak@google.com
Diffstat (limited to 'drivers/pinctrl/samsung/pinctrl-samsung.c')
-rw-r--r-- | drivers/pinctrl/samsung/pinctrl-samsung.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.c b/drivers/pinctrl/samsung/pinctrl-samsung.c index 4837bceb767b..bd13b5ef246d 100644 --- a/drivers/pinctrl/samsung/pinctrl-samsung.c +++ b/drivers/pinctrl/samsung/pinctrl-samsung.c @@ -1166,15 +1166,15 @@ static int samsung_pinctrl_probe(struct platform_device *pdev) if (ret) goto err_put_banks; - ret = samsung_gpiolib_register(pdev, drvdata); - if (ret) - goto err_unregister; - if (ctrl->eint_gpio_init) ctrl->eint_gpio_init(drvdata); if (ctrl->eint_wkup_init) ctrl->eint_wkup_init(drvdata); + ret = samsung_gpiolib_register(pdev, drvdata); + if (ret) + goto err_unregister; + platform_set_drvdata(pdev, drvdata); return 0; |