From: Firo Yang <firogm@gmail.com>
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: pxa: ssp: Use devm_ioremap_resource instead of devm_ioremap
Date: Mon, 08 Jun 2015 08:53:52 +0000 [thread overview]
Message-ID: <1433753632-28534-1-git-send-email-firogm@gmail.com> (raw)
Using devm_ioremap_resource() API to simplify the code.
Signed-off-by: Firo Yang <firogm@gmail.com>
---
According to Julia's advices:
The patch "[PATCH v2] ARM: pxa: ssp: remove unnessary free for devm_xxx"
submited by Firo Yang should be discard. It was obsoleted by
"[PATCH] ARM: pxa: ssp: remove unnessary free for devm_xxx"
and
"[PATCH] ARM: pxa: ssp: Use devm_ioremap_resource instead of devm_ioremap"
I am not sure whether it was clear. If there is any doubt, please
email me.
arch/arm/plat-pxa/ssp.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/arch/arm/plat-pxa/ssp.c b/arch/arm/plat-pxa/ssp.c
index ad9529c..8fd5245 100644
--- a/arch/arm/plat-pxa/ssp.c
+++ b/arch/arm/plat-pxa/ssp.c
@@ -182,21 +182,12 @@ static int pxa_ssp_probe(struct platform_device *pdev)
return -ENODEV;
}
- res = devm_request_mem_region(dev, res->start, resource_size(res),
- pdev->name);
- if (res = NULL) {
- dev_err(dev, "failed to request memory resource\n");
- return -EBUSY;
- }
+ ssp->mmio_base = devm_ioremap_resource(dev, res);
+ if (IS_ERR(ssp->mmio_base))
+ return PTR_ERR(ssp->mmio_base);
ssp->phys_base = res->start;
- ssp->mmio_base = devm_ioremap(dev, res->start, resource_size(res));
- if (ssp->mmio_base = NULL) {
- dev_err(dev, "failed to ioremap() registers\n");
- return -ENODEV;
- }
-
ssp->irq = platform_get_irq(pdev, 0);
if (ssp->irq < 0) {
dev_err(dev, "no IRQ resource defined\n");
--
2.4.2
WARNING: multiple messages have this Message-ID (diff)
From: firogm@gmail.com (Firo Yang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: pxa: ssp: Use devm_ioremap_resource instead of devm_ioremap
Date: Mon, 8 Jun 2015 16:53:52 +0800 [thread overview]
Message-ID: <1433753632-28534-1-git-send-email-firogm@gmail.com> (raw)
Using devm_ioremap_resource() API to simplify the code.
Signed-off-by: Firo Yang <firogm@gmail.com>
---
According to Julia's advices:
The patch "[PATCH v2] ARM: pxa: ssp: remove unnessary free for devm_xxx"
submited by Firo Yang should be discard. It was obsoleted by
"[PATCH] ARM: pxa: ssp: remove unnessary free for devm_xxx"
and
"[PATCH] ARM: pxa: ssp: Use devm_ioremap_resource instead of devm_ioremap"
I am not sure whether it was clear. If there is any doubt, please
email me.
arch/arm/plat-pxa/ssp.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/arch/arm/plat-pxa/ssp.c b/arch/arm/plat-pxa/ssp.c
index ad9529c..8fd5245 100644
--- a/arch/arm/plat-pxa/ssp.c
+++ b/arch/arm/plat-pxa/ssp.c
@@ -182,21 +182,12 @@ static int pxa_ssp_probe(struct platform_device *pdev)
return -ENODEV;
}
- res = devm_request_mem_region(dev, res->start, resource_size(res),
- pdev->name);
- if (res == NULL) {
- dev_err(dev, "failed to request memory resource\n");
- return -EBUSY;
- }
+ ssp->mmio_base = devm_ioremap_resource(dev, res);
+ if (IS_ERR(ssp->mmio_base))
+ return PTR_ERR(ssp->mmio_base);
ssp->phys_base = res->start;
- ssp->mmio_base = devm_ioremap(dev, res->start, resource_size(res));
- if (ssp->mmio_base == NULL) {
- dev_err(dev, "failed to ioremap() registers\n");
- return -ENODEV;
- }
-
ssp->irq = platform_get_irq(pdev, 0);
if (ssp->irq < 0) {
dev_err(dev, "no IRQ resource defined\n");
--
2.4.2
next reply other threads:[~2015-06-08 8:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-08 8:53 Firo Yang [this message]
2015-06-08 8:53 ` [PATCH] ARM: pxa: ssp: Use devm_ioremap_resource instead of devm_ioremap Firo Yang
2015-06-08 9:01 ` Julia Lawall
2015-06-08 9:01 ` Julia Lawall
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=1433753632-28534-1-git-send-email-firogm@gmail.com \
--to=firogm@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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.