Re: [PATCH v1] pinctrl: samsung: Finish initializing the gpios before registering them

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 27 Jul 2022 at 04:33, Saravana Kannan <saravanak@xxxxxxxxxx> wrote:
>
> 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@xxxxxxxxxx>
> ---

Reviewed-by: Sam Protsenko <semen.protsenko@xxxxxxxxxx>

>  drivers/pinctrl/samsung/pinctrl-samsung.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.c b/drivers/pinctrl/samsung/pinctrl-samsung.c
> index 26d309d2516d..a302b38a63a8 100644
> --- a/drivers/pinctrl/samsung/pinctrl-samsung.c
> +++ b/drivers/pinctrl/samsung/pinctrl-samsung.c
> @@ -1168,15 +1168,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;
> --
> 2.37.1.359.gd136c6c3e2-goog
>



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux