From: Yangtao Li <tiny.windzz@gmail.com>
To: ssantosh@kernel.org, paul@crapouillou.net,
matthias.bgg@gmail.com, rogerq@ti.com, tony@atomide.com,
lukasz.luba@arm.com, kgene@kernel.org, krzk@kernel.org,
thierry.reding@gmail.com, jonathanh@nvidia.com,
allison@lohutok.net, tglx@linutronix.de, yong.wu@mediatek.com,
jroedel@suse.de, evgreen@chromium.org, rfontana@redhat.com,
digetx@gmail.com, pdeschrijver@nvidia.com, john@phrozen.org,
alexios.zavras@intel.com, sboyd@kernel.org,
kstewart@linuxfoundation.org, info@metux.net,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-omap@vger.kernel.org,
linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
linux-tegra@vger.kernel.org
Cc: Yangtao Li <tiny.windzz@gmail.com>
Subject: [PATCH 9/9] memory: omap-gpmc: switch to platform_get_irq
Date: Sun, 22 Dec 2019 18:50:34 +0000 [thread overview]
Message-ID: <20191222185034.4665-9-tiny.windzz@gmail.com> (raw)
In-Reply-To: <20191222185034.4665-1-tiny.windzz@gmail.com>
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/memory/omap-gpmc.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index eff26c1b1394..6dd19d168f75 100644
--- a/drivers/memory/omap-gpmc.c
+++ b/drivers/memory/omap-gpmc.c
@@ -2366,13 +2366,9 @@ static int gpmc_probe(struct platform_device *pdev)
if (IS_ERR(gpmc_base))
return PTR_ERR(gpmc_base);
- res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
- if (!res) {
- dev_err(&pdev->dev, "Failed to get resource: irq\n");
- return -ENOENT;
- }
-
- gpmc->irq = res->start;
+ gpmc->irq = platform_get_irq(pdev, 0);
+ if (gpmc->irq < 0)
+ return gpmc->irq;
gpmc_l3_clk = devm_clk_get(&pdev->dev, "fck");
if (IS_ERR(gpmc_l3_clk)) {
--
2.17.1
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
WARNING: multiple messages have this Message-ID (diff)
From: Yangtao Li <tiny.windzz@gmail.com>
To: ssantosh@kernel.org, paul@crapouillou.net,
matthias.bgg@gmail.com, rogerq@ti.com, tony@atomide.com,
lukasz.luba@arm.com, kgene@kernel.org, krzk@kernel.org,
thierry.reding@gmail.com, jonathanh@nvidia.com,
allison@lohutok.net, tglx@linutronix.de, yong.wu@mediatek.com,
jroedel@suse.de, evgreen@chromium.org, rfontana@redhat.com,
digetx@gmail.com, pdeschrijver@nvidia.com, john@phrozen.org,
alexios.zavras@intel.com, sboyd@kernel.org,
kstewart@linuxfoundation.org, info@metux.net,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-omap@vger.kernel.org,
linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
linux-tegra@vger.kernel.org
Cc: Yangtao Li <tiny.windzz@gmail.com>
Subject: [PATCH 9/9] memory: omap-gpmc: switch to platform_get_irq
Date: Sun, 22 Dec 2019 18:50:34 +0000 [thread overview]
Message-ID: <20191222185034.4665-9-tiny.windzz@gmail.com> (raw)
In-Reply-To: <20191222185034.4665-1-tiny.windzz@gmail.com>
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/memory/omap-gpmc.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index eff26c1b1394..6dd19d168f75 100644
--- a/drivers/memory/omap-gpmc.c
+++ b/drivers/memory/omap-gpmc.c
@@ -2366,13 +2366,9 @@ static int gpmc_probe(struct platform_device *pdev)
if (IS_ERR(gpmc_base))
return PTR_ERR(gpmc_base);
- res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
- if (!res) {
- dev_err(&pdev->dev, "Failed to get resource: irq\n");
- return -ENOENT;
- }
-
- gpmc->irq = res->start;
+ gpmc->irq = platform_get_irq(pdev, 0);
+ if (gpmc->irq < 0)
+ return gpmc->irq;
gpmc_l3_clk = devm_clk_get(&pdev->dev, "fck");
if (IS_ERR(gpmc_l3_clk)) {
--
2.17.1
WARNING: multiple messages have this Message-ID (diff)
From: Yangtao Li <tiny.windzz@gmail.com>
To: ssantosh@kernel.org, paul@crapouillou.net,
matthias.bgg@gmail.com, rogerq@ti.com, tony@atomide.com,
lukasz.luba@arm.com, kgene@kernel.org, krzk@kernel.org,
thierry.reding@gmail.com, jonathanh@nvidia.com,
allison@lohutok.net, tglx@linutronix.de, yong.wu@mediatek.com,
jroedel@suse.de, evgreen@chromium.org, rfontana@redhat.com,
digetx@gmail.com, pdeschrijver@nvidia.com, john@phrozen.org,
alexios.zavras@intel.com, sboyd@kernel.org,
kstewart@linuxfoundation.org, info@metux.net,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-omap@vger.kernel.org,
linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
linux-tegra@vger.kernel.org
Cc: Yangtao Li <tiny.windzz@gmail.com>
Subject: [PATCH 9/9] memory: omap-gpmc: switch to platform_get_irq
Date: Sun, 22 Dec 2019 18:50:34 +0000 [thread overview]
Message-ID: <20191222185034.4665-9-tiny.windzz@gmail.com> (raw)
In-Reply-To: <20191222185034.4665-1-tiny.windzz@gmail.com>
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/memory/omap-gpmc.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index eff26c1b1394..6dd19d168f75 100644
--- a/drivers/memory/omap-gpmc.c
+++ b/drivers/memory/omap-gpmc.c
@@ -2366,13 +2366,9 @@ static int gpmc_probe(struct platform_device *pdev)
if (IS_ERR(gpmc_base))
return PTR_ERR(gpmc_base);
- res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
- if (!res) {
- dev_err(&pdev->dev, "Failed to get resource: irq\n");
- return -ENOENT;
- }
-
- gpmc->irq = res->start;
+ gpmc->irq = platform_get_irq(pdev, 0);
+ if (gpmc->irq < 0)
+ return gpmc->irq;
gpmc_l3_clk = devm_clk_get(&pdev->dev, "fck");
if (IS_ERR(gpmc_l3_clk)) {
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-12-22 18:53 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-22 18:50 [PATCH 1/9] memory: emif: convert to devm_platform_ioremap_resource Yangtao Li
2019-12-22 18:50 ` Yangtao Li
2019-12-22 18:50 ` Yangtao Li
2019-12-22 18:50 ` [PATCH 2/9] memory: jz4780_nemc: " Yangtao Li
2019-12-22 18:50 ` Yangtao Li
2019-12-22 18:50 ` Yangtao Li
2019-12-23 11:44 ` Paul Cercueil
2019-12-23 11:44 ` Paul Cercueil
2019-12-23 11:44 ` Paul Cercueil
2019-12-22 18:50 ` [PATCH 3/9] memory: mvebu-devbus: " Yangtao Li
2019-12-22 18:50 ` Yangtao Li
2019-12-22 18:50 ` Yangtao Li
2020-01-08 9:41 ` Gregory CLEMENT
2020-01-08 9:41 ` Gregory CLEMENT
2020-01-08 9:41 ` Gregory CLEMENT
2020-01-08 9:41 ` Gregory CLEMENT
2019-12-22 18:50 ` [PATCH 4/9] memory: tegra: " Yangtao Li
2019-12-22 18:50 ` Yangtao Li
2019-12-22 18:50 ` Yangtao Li
2019-12-23 15:42 ` Dmitry Osipenko
2019-12-23 15:42 ` Dmitry Osipenko
2019-12-23 15:42 ` Dmitry Osipenko
2019-12-22 18:50 ` [PATCH 5/9] memory: fsl-corenet-cf: " Yangtao Li
2019-12-22 18:50 ` Yangtao Li
2019-12-22 18:50 ` Yangtao Li
2019-12-22 18:50 ` [PATCH 6/9] memory: ti-aemif: " Yangtao Li
2019-12-22 18:50 ` Yangtao Li
2019-12-22 18:50 ` Yangtao Li
2019-12-22 18:50 ` [PATCH 7/9] memory: samsung: exynos5422-dmc: " Yangtao Li
2019-12-22 18:50 ` Yangtao Li
2019-12-22 18:50 ` Yangtao Li
2019-12-30 9:13 ` Lukasz Luba
2019-12-30 9:13 ` Lukasz Luba
2019-12-30 9:13 ` Lukasz Luba
2019-12-30 17:56 ` Krzysztof Kozlowski
2019-12-30 17:56 ` Krzysztof Kozlowski
2019-12-30 17:56 ` Krzysztof Kozlowski
2019-12-22 18:50 ` [PATCH 8/9] memory: mtk-smi: " Yangtao Li
2019-12-22 18:50 ` Yangtao Li
2019-12-22 18:50 ` Yangtao Li
2019-12-27 7:24 ` Yong Wu
2019-12-27 7:24 ` Yong Wu
2019-12-27 7:24 ` Yong Wu
2019-12-27 7:24 ` Yong Wu
2019-12-22 18:50 ` Yangtao Li [this message]
2019-12-22 18:50 ` [PATCH 9/9] memory: omap-gpmc: switch to platform_get_irq Yangtao Li
2019-12-22 18:50 ` Yangtao Li
2019-12-23 7:25 ` Roger Quadros
2019-12-23 7:25 ` Roger Quadros
2019-12-23 7:25 ` Roger Quadros
2019-12-23 7:25 ` Roger Quadros
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191222185034.4665-9-tiny.windzz@gmail.com \
--to=tiny.windzz@gmail.com \
--cc=alexios.zavras@intel.com \
--cc=allison@lohutok.net \
--cc=digetx@gmail.com \
--cc=evgreen@chromium.org \
--cc=info@metux.net \
--cc=john@phrozen.org \
--cc=jonathanh@nvidia.com \
--cc=jroedel@suse.de \
--cc=kgene@kernel.org \
--cc=krzk@kernel.org \
--cc=kstewart@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=matthias.bgg@gmail.com \
--cc=paul@crapouillou.net \
--cc=pdeschrijver@nvidia.com \
--cc=rfontana@redhat.com \
--cc=rogerq@ti.com \
--cc=sboyd@kernel.org \
--cc=ssantosh@kernel.org \
--cc=tglx@linutronix.de \
--cc=thierry.reding@gmail.com \
--cc=tony@atomide.com \
--cc=yong.wu@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.