Commit 39bd56df authored by Alexandre Belloni's avatar Alexandre Belloni Committed by Wim Van Sebroeck

watchodg: sama5d4: simplify probe

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: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent 3c2993b8
...@@ -228,15 +228,13 @@ static int sama5d4_wdt_probe(struct platform_device *pdev) ...@@ -228,15 +228,13 @@ static int sama5d4_wdt_probe(struct platform_device *pdev)
wdt->reg_base = regs; wdt->reg_base = regs;
if (pdev->dev.of_node) { irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
irq = irq_of_parse_and_map(pdev->dev.of_node, 0); if (!irq)
if (!irq) dev_warn(&pdev->dev, "failed to get IRQ from DT\n");
dev_warn(&pdev->dev, "failed to get IRQ from DT\n");
ret = of_sama5d4_wdt_init(pdev->dev.of_node, wdt); ret = of_sama5d4_wdt_init(pdev->dev.of_node, wdt);
if (ret) if (ret)
return ret; return ret;
}
if ((wdt->mr & AT91_WDT_WDFIEN) && irq) { if ((wdt->mr & AT91_WDT_WDFIEN) && irq) {
ret = devm_request_irq(&pdev->dev, irq, sama5d4_wdt_irq_handler, ret = devm_request_irq(&pdev->dev, irq, sama5d4_wdt_irq_handler,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment