mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 02:19:51 +00:00
watchdog: s3c2410: Use platform_get_irq() to get the interrupt
platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static allocation of IRQ resources in DT core code, this causes an issue when using hierarchical interrupt domains using "interrupts" property in the node as this bypassed the hierarchical setup and messed up the irq chaining. In preparation for removal of static setup of IRQ resource from DT core code use platform_get_irq(). Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Link: https://lore.kernel.org/r/20211216214747.10454-1-prabhakar.mahadev-lad.rj@bp.renesas.com [groeck: Fixed context conflicts] Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
This commit is contained in:
parent
af5bb1c207
commit
a51f589693
1 changed files with 6 additions and 8 deletions
|
@ -661,8 +661,8 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct device *dev = &pdev->dev;
|
struct device *dev = &pdev->dev;
|
||||||
struct s3c2410_wdt *wdt;
|
struct s3c2410_wdt *wdt;
|
||||||
struct resource *wdt_irq;
|
|
||||||
unsigned int wtcon;
|
unsigned int wtcon;
|
||||||
|
int wdt_irq;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL);
|
wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL);
|
||||||
|
@ -686,11 +686,9 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wdt_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
|
wdt_irq = platform_get_irq(pdev, 0);
|
||||||
if (wdt_irq == NULL) {
|
if (wdt_irq < 0)
|
||||||
dev_err(dev, "no irq resource specified\n");
|
return wdt_irq;
|
||||||
return -ENOENT;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* get the memory region for the watchdog timer */
|
/* get the memory region for the watchdog timer */
|
||||||
wdt->reg_base = devm_platform_ioremap_resource(pdev, 0);
|
wdt->reg_base = devm_platform_ioremap_resource(pdev, 0);
|
||||||
|
@ -754,7 +752,7 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = devm_request_irq(dev, wdt_irq->start, s3c2410wdt_irq, 0,
|
ret = devm_request_irq(dev, wdt_irq, s3c2410wdt_irq, 0,
|
||||||
pdev->name, pdev);
|
pdev->name, pdev);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
dev_err(dev, "failed to install irq (%d)\n", ret);
|
dev_err(dev, "failed to install irq (%d)\n", ret);
|
||||||
|
|
Loading…
Reference in a new issue