Skip to content

Commit 152a81a

Browse files
Saravana Kannankrzk
authored andcommitted
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 <[email protected]> Reviewed-by: Sam Protsenko <[email protected]> Reviewed-by: Chanho Park <[email protected]> Tested-by: Chanho Park <[email protected]> Signed-off-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 568035b commit 152a81a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/pinctrl/samsung/pinctrl-samsung.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,15 +1166,15 @@ static int samsung_pinctrl_probe(struct platform_device *pdev)
11661166
if (ret)
11671167
goto err_put_banks;
11681168

1169-
ret = samsung_gpiolib_register(pdev, drvdata);
1170-
if (ret)
1171-
goto err_unregister;
1172-
11731169
if (ctrl->eint_gpio_init)
11741170
ctrl->eint_gpio_init(drvdata);
11751171
if (ctrl->eint_wkup_init)
11761172
ctrl->eint_wkup_init(drvdata);
11771173

1174+
ret = samsung_gpiolib_register(pdev, drvdata);
1175+
if (ret)
1176+
goto err_unregister;
1177+
11781178
platform_set_drvdata(pdev, drvdata);
11791179

11801180
return 0;

0 commit comments

Comments
 (0)