lkml.org 
[lkml]   [2020]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 3/6] gpio: omap: Simplify with dev_err_probe()
From
Date


On 27/08/2020 23:08, Krzysztof Kozlowski wrote:
> Common pattern of handling deferred probe can be simplified with
> dev_err_probe(). Less code and also it prints the error value.
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
> drivers/gpio/gpio-omap.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
> index 7fbe0c9e1fc1..2dc12f4addbd 100644
> --- a/drivers/gpio/gpio-omap.c
> +++ b/drivers/gpio/gpio-omap.c
> @@ -1394,10 +1394,7 @@ static int omap_gpio_probe(struct platform_device *pdev)
> if (bank->irq <= 0) {
> if (!bank->irq)
> bank->irq = -ENXIO;
> - if (bank->irq != -EPROBE_DEFER)
> - dev_err(dev,
> - "can't get irq resource ret=%d\n", bank->irq);
> - return bank->irq;
> + return dev_err_probe(dev, bank->irq, "can't get irq resource\n");
> }
>
> bank->chip.parent = dev;
>

Acked-by: Grygorii Strashko <grygorii.strashko@ti.com>

--
Best regards,
grygorii

\
 
 \ /
  Last update: 2020-08-28 10:02    [W:0.080 / U:3.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site