mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-12 21:44:06 +08:00
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
This commit is contained in:
parent
568035b01c
commit
152a81a0b1
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user