pinctrl: gs-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. Change-Id: If3e264ab764c633f00fcc280db0e1f9a10af5efb Signed-off-by: Saravana Kannan <saravanak@google.com> (cherry picked from commit 32188bddc9d8ba8d5907882ed5bd1dc3a83662a9)
This commit is contained in:
parent
5599f77e14
commit
212effe101
1 changed files with 4 additions and 4 deletions
|
@ -1305,15 +1305,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);
|
||||
|
||||
/* Add to the global list */
|
||||
|
|
Loading…
Add table
Reference in a new issue