From: Heiner Kallweit <hkallweit1@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org
Subject: [PATCH 2/3] gpio: generic: replace devm_request_mem_region / devm_ioremap with devm_ioremap_resource
Date: Wed, 30 Sep 2015 23:51:08 +0200 [thread overview]
Message-ID: <560C594C.7090804@gmail.com> (raw)
Replace devm_request_mem_region / devm_ioremap with devm_ioremap_resource.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/gpio/gpio-generic.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/drivers/gpio/gpio-generic.c b/drivers/gpio/gpio-generic.c
index eefff1a..0cdbe10 100644
--- a/drivers/gpio/gpio-generic.c
+++ b/drivers/gpio/gpio-generic.c
@@ -582,9 +582,7 @@ static void __iomem *bgpio_map(struct platform_device *pdev,
resource_size_t sane_sz,
int *err)
{
- struct device *dev = &pdev->dev;
struct resource *r;
- resource_size_t start;
resource_size_t sz;
void __iomem *ret;
@@ -602,15 +600,9 @@ static void __iomem *bgpio_map(struct platform_device *pdev,
return NULL;
}
- start = r->start;
- if (!devm_request_mem_region(dev, start, sz, r->name)) {
- *err = -EBUSY;
- return NULL;
- }
-
- ret = devm_ioremap(dev, start, sz);
- if (!ret) {
- *err = -ENOMEM;
+ ret = devm_ioremap_resource(&pdev->dev, r);
+ if (IS_ERR(ret)) {
+ *err = PTR_ERR(ret);
return NULL;
}
--
2.6.0
next reply other threads:[~2015-09-30 21:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-30 21:51 Heiner Kallweit [this message]
2015-10-05 7:15 ` [PATCH 2/3] gpio: generic: replace devm_request_mem_region / devm_ioremap with devm_ioremap_resource Linus Walleij
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=560C594C.7090804@gmail.com \
--to=hkallweit1@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.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.