* [PATCH] platform: goldfish: pipe: switch to platform_get_irq
@ 2019-12-29 8:34 Yangtao Li
0 siblings, 0 replies; 3+ messages in thread
From: Yangtao Li @ 2019-12-29 8:34 UTC (permalink / raw)
To: ira.weiny, hubcap, akpm; +Cc: linux-kernel, Yangtao Li
platform_get_resource(pdev, IORESOURCE_IRQ) is not recommended for
requesting IRQ's resources, as they can be not ready yet. Using
platform_get_irq() instead is preferred for getting IRQ even if it
was not retrieved earlier.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
drivers/platform/goldfish/goldfish_pipe.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c
index cef0133aa47a..a1ebaec6eea9 100644
--- a/drivers/platform/goldfish/goldfish_pipe.c
+++ b/drivers/platform/goldfish/goldfish_pipe.c
@@ -913,11 +913,9 @@ static int goldfish_pipe_probe(struct platform_device *pdev)
return -EINVAL;
}
- r = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
- if (!r)
- return -EINVAL;
-
- dev->irq = r->start;
+ dev->irq = platform_get_irq(pdev, 0);
+ if (dev->irq < 0)
+ return dev->irq;
/*
* Exchange the versions with the host device
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] platform: goldfish: pipe: switch to platform_get_irq
2019-12-29 10:43 [PATCH 1/2] lib: devres: provide devm_ioremap_resource_nocache() Yangtao Li
@ 2019-12-29 10:43 ` Yangtao Li
2019-12-29 10:44 ` Frank Lee
0 siblings, 1 reply; 3+ messages in thread
From: Yangtao Li @ 2019-12-29 10:43 UTC (permalink / raw)
To: corbet, gregkh, bgolaszewski, arnd, sboyd, mchehab+samsung,
matti.vaittinen, phil.edworthy, suzuki.poulose, saravanak,
heikki.krogerus, dan.j.williams, joe, jeffrey.t.kirsher, mans,
tglx, hdegoede, akpm, ulf.hansson, ztuowen, sergei.shtylyov,
linux-doc, linux-kernel
Cc: Yangtao Li
platform_get_resource(pdev, IORESOURCE_IRQ) is not recommended for
requesting IRQ's resources, as they can be not ready yet. Using
platform_get_irq() instead is preferred for getting IRQ even if it
was not retrieved earlier.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
drivers/platform/goldfish/goldfish_pipe.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c
index cef0133aa47a..a1ebaec6eea9 100644
--- a/drivers/platform/goldfish/goldfish_pipe.c
+++ b/drivers/platform/goldfish/goldfish_pipe.c
@@ -913,11 +913,9 @@ static int goldfish_pipe_probe(struct platform_device *pdev)
return -EINVAL;
}
- r = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
- if (!r)
- return -EINVAL;
-
- dev->irq = r->start;
+ dev->irq = platform_get_irq(pdev, 0);
+ if (dev->irq < 0)
+ return dev->irq;
/*
* Exchange the versions with the host device
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] platform: goldfish: pipe: switch to platform_get_irq
2019-12-29 10:43 ` [PATCH] platform: goldfish: pipe: switch to platform_get_irq Yangtao Li
@ 2019-12-29 10:44 ` Frank Lee
0 siblings, 0 replies; 3+ messages in thread
From: Frank Lee @ 2019-12-29 10:44 UTC (permalink / raw)
To: Jonathan Corbet, Greg Kroah-Hartman, bgolaszewski, Arnd Bergmann,
Stephen Boyd, Mauro Carvalho Chehab, matti.vaittinen,
phil.edworthy, suzuki.poulose, saravanak, heikki.krogerus,
dan.j.williams, Joe Perches, jeffrey.t.kirsher, mans, tglx,
hdegoede, Andrew Morton, Ulf Hansson, ztuowen, sergei.shtylyov,
linux-doc, Linux Kernel Mailing List
Ignore this, I posted it just now...
On Sun, Dec 29, 2019 at 6:43 PM Yangtao Li <tiny.windzz@gmail.com> wrote:
>
> platform_get_resource(pdev, IORESOURCE_IRQ) is not recommended for
> requesting IRQ's resources, as they can be not ready yet. Using
> platform_get_irq() instead is preferred for getting IRQ even if it
> was not retrieved earlier.
>
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> ---
> drivers/platform/goldfish/goldfish_pipe.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c
> index cef0133aa47a..a1ebaec6eea9 100644
> --- a/drivers/platform/goldfish/goldfish_pipe.c
> +++ b/drivers/platform/goldfish/goldfish_pipe.c
> @@ -913,11 +913,9 @@ static int goldfish_pipe_probe(struct platform_device *pdev)
> return -EINVAL;
> }
>
> - r = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> - if (!r)
> - return -EINVAL;
> -
> - dev->irq = r->start;
> + dev->irq = platform_get_irq(pdev, 0);
> + if (dev->irq < 0)
> + return dev->irq;
>
> /*
> * Exchange the versions with the host device
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-12-29 10:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-29 8:34 [PATCH] platform: goldfish: pipe: switch to platform_get_irq Yangtao Li
-- strict thread matches above, loose matches on Subject: below --
2019-12-29 10:43 [PATCH 1/2] lib: devres: provide devm_ioremap_resource_nocache() Yangtao Li
2019-12-29 10:43 ` [PATCH] platform: goldfish: pipe: switch to platform_get_irq Yangtao Li
2019-12-29 10:44 ` Frank Lee
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.