Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1592508

Re: [PATCH 3/4] watchodg: sama5d4: simplify probe

From Guenter Roeck <linux@roeck-us.net>
Newsgroups linux.kernel
Subject Re: [PATCH 3/4] watchodg: sama5d4: simplify probe
Date 2017-03-04 16:10 +0100
Message-ID <thjtM-2xJ-11@gated-at.bofh.it> (permalink)
References <tgDbc-5KR-31@gated-at.bofh.it> <tgDbc-5KR-35@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 03/02/2017 09:31 AM, Alexandre Belloni wrote:
> Because the only way to use the driver is to have a device tree enabling
> it, pdev->dev.of_node will never be NULL. Remove the unnecessary check.
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/watchdog/sama5d4_wdt.c | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/watchdog/sama5d4_wdt.c b/drivers/watchdog/sama5d4_wdt.c
> index 362fd229786d..d710014f3b7d 100644
> --- a/drivers/watchdog/sama5d4_wdt.c
> +++ b/drivers/watchdog/sama5d4_wdt.c
> @@ -228,15 +228,13 @@ static int sama5d4_wdt_probe(struct platform_device *pdev)
>
>  	wdt->reg_base = regs;
>
> -	if (pdev->dev.of_node) {
> -		irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
> -		if (!irq)
> -			dev_warn(&pdev->dev, "failed to get IRQ from DT\n");
> +	irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
> +	if (!irq)
> +		dev_warn(&pdev->dev, "failed to get IRQ from DT\n");
>
> -		ret = of_sama5d4_wdt_init(pdev->dev.of_node, wdt);
> -		if (ret)
> -			return ret;
> -	}
> +	ret = of_sama5d4_wdt_init(pdev->dev.of_node, wdt);
> +	if (ret)
> +		return ret;
>
>  	if ((wdt->mr & AT91_WDT_WDFIEN) && irq) {
>  		ret = devm_request_irq(&pdev->dev, irq, sama5d4_wdt_irq_handler,
>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/4] watchdog: sama5d4: fix issues Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-03-02 19:00 +0100
  [PATCH 3/4] watchodg: sama5d4: simplify probe Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-03-02 19:00 +0100
    Re: [PATCH 3/4] watchodg: sama5d4: simplify probe Alexander Dahl <post@lespocky.de> - 2017-03-02 20:40 +0100
    Re: [PATCH 3/4] watchodg: sama5d4: simplify probe Thomas Petazzoni <thomas.petazzoni@free-electrons.com> - 2017-03-03 12:20 +0100
      Re: [PATCH 3/4] watchodg: sama5d4: simplify probe Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-03-03 12:30 +0100
        Re: [PATCH 3/4] watchodg: sama5d4: simplify probe Guenter Roeck <linux@roeck-us.net> - 2017-03-03 16:10 +0100
    Re: [PATCH 3/4] watchodg: sama5d4: simplify probe Guenter Roeck <linux@roeck-us.net> - 2017-03-04 16:10 +0100
  Re: [PATCH 2/4] watchdog: sama5d4: fix race condition Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-03-02 19:00 +0100
  Re: [PATCH 2/4] watchdog: sama5d4: fix race condition Guenter Roeck <linux@roeck-us.net> - 2017-03-02 20:10 +0100
  [PATCH 1/4] watchdog: sama5d4: fix WDDIS handling Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-03-03 09:30 +0100
    Re: [PATCH 1/4] watchdog: sama5d4: fix WDDIS handling Guenter Roeck <linux@roeck-us.net> - 2017-03-04 17:10 +0100
    RE: [PATCH 1/4] watchdog: sama5d4: fix WDDIS handling <Wenyou.Yang@microchip.com> - 2017-03-07 03:20 +0100
  [PATCH 4/4] watchdog: sama5d4: Add comment explaining what happens on resume Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-03-03 09:30 +0100
    Re: [PATCH 4/4] watchdog: sama5d4: Add comment explaining what  happens on resume Guenter Roeck <linux@roeck-us.net> - 2017-03-04 16:10 +0100
  [PATCH 2/4] watchdog: sama5d4: fix race condition Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-03-03 09:30 +0100
    Re: [PATCH 2/4] watchdog: sama5d4: fix race condition Guenter Roeck <linux@roeck-us.net> - 2017-03-04 16:10 +0100
    RE: [PATCH 2/4] watchdog: sama5d4: fix race condition <Wenyou.Yang@microchip.com> - 2017-03-07 03:10 +0100

csiph-web