From: "Enrico Weigelt, metux IT consult" <info@metux.net>
To: linux-kernel@vger.kernel.org
Cc: linus.walleij@linaro.org, bgolaszewski@baylibre.com,
orsonzhai@gmail.com, baolin.wang@linaro.org,
zhang.lyra@gmail.com, linux-gpio@vger.kernel.org
Subject: [PATCH 3/7] drivers: gpio: eic-sprd: use devm_platform_ioremap_resource()
Date: Mon, 17 Jun 2019 18:49:16 +0200 [thread overview]
Message-ID: <1560790160-3372-3-git-send-email-info@metux.net> (raw)
In-Reply-To: <1560790160-3372-1-git-send-email-info@metux.net>
Use the new helper that wraps the calls to platform_get_resource()
and devm_ioremap_resource() together.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
drivers/gpio/gpio-eic-sprd.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/gpio/gpio-eic-sprd.c b/drivers/gpio/gpio-eic-sprd.c
index 7709226..7b9ac4a 100644
--- a/drivers/gpio/gpio-eic-sprd.c
+++ b/drivers/gpio/gpio-eic-sprd.c
@@ -568,7 +568,6 @@ static int sprd_eic_probe(struct platform_device *pdev)
const struct sprd_eic_variant_data *pdata;
struct gpio_irq_chip *irq;
struct sprd_eic *sprd_eic;
- struct resource *res;
int ret, i;
pdata = of_device_get_match_data(&pdev->dev);
@@ -597,13 +596,9 @@ static int sprd_eic_probe(struct platform_device *pdev)
* have one bank EIC, thus base[1] and base[2] can be
* optional.
*/
- res = platform_get_resource(pdev, IORESOURCE_MEM, i);
- if (!res)
- continue;
-
- sprd_eic->base[i] = devm_ioremap_resource(&pdev->dev, res);
+ sprd_eic->base[i] = devm_platform_ioremap_resource(pdev, i);
if (IS_ERR(sprd_eic->base[i]))
- return PTR_ERR(sprd_eic->base[i]);
+ continue;
}
sprd_eic->chip.label = sprd_eic_label_name[sprd_eic->type];
--
1.9.1
next prev parent reply other threads:[~2019-06-17 16:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-17 16:49 [PATCH 1/7] drivers: gpio: rcar: pedantic formatting Enrico Weigelt, metux IT consult
2019-06-17 16:49 ` [PATCH 2/7] drivers: gpio: amdpt: drop unneeded deref of &pdev->dev Enrico Weigelt, metux IT consult
2019-06-25 9:05 ` Linus Walleij
2019-06-17 16:49 ` Enrico Weigelt, metux IT consult [this message]
2019-06-19 11:34 ` [PATCH 3/7] drivers: gpio: eic-sprd: use devm_platform_ioremap_resource() Baolin Wang
2019-06-25 9:12 ` Linus Walleij
2019-06-17 16:49 ` [PATCH 4/7] drivers: gpio: ep93xx: devm_platform_ioremap_resource() Enrico Weigelt, metux IT consult
2019-06-25 9:06 ` Linus Walleij
2019-06-17 16:49 ` [PATCH 5/7] drivers: gpio: grgpio: use devm_platform_ioremap_resource() Enrico Weigelt, metux IT consult
2019-06-25 9:07 ` Linus Walleij
2019-06-17 16:49 ` [PATCH 6/7] drivers: gpio: janz-ttl: drop unneccessary temp variable dev Enrico Weigelt, metux IT consult
2019-06-25 9:08 ` Linus Walleij
2019-06-17 16:49 ` [PATCH 7/7] drivers: gpio: vr41xx: use devm_platform_ioremap_resource() Enrico Weigelt, metux IT consult
2019-06-25 9:10 ` Linus Walleij
2019-06-25 9:04 ` [PATCH 1/7] drivers: gpio: rcar: pedantic formatting 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=1560790160-3372-3-git-send-email-info@metux.net \
--to=info@metux.net \
--cc=baolin.wang@linaro.org \
--cc=bgolaszewski@baylibre.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=orsonzhai@gmail.com \
--cc=zhang.lyra@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).