From: Axel Lin <axel.lin@ingics.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>,
James Hogan <james.hogan@imgtec.com>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>
Subject: [PATCH 2/2] gpio: tz1090-pdc: Use resource_size to fix off-by-one resource size calculation
Date: Sun, 28 Dec 2014 14:01:50 +0800 [thread overview]
Message-ID: <1419746510.4496.2.camel@phoenix> (raw)
In-Reply-To: <1419746439.4496.1.camel@phoenix>
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/gpio/gpio-tz1090-pdc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-tz1090-pdc.c b/drivers/gpio/gpio-tz1090-pdc.c
index d753622..ede7e40 100644
--- a/drivers/gpio/gpio-tz1090-pdc.c
+++ b/drivers/gpio/gpio-tz1090-pdc.c
@@ -190,7 +190,7 @@ static int tz1090_pdc_gpio_probe(struct platform_device *pdev)
/* Ioremap the registers */
priv->reg = devm_ioremap(&pdev->dev, res_regs->start,
- res_regs->end - res_regs->start);
+ resource_size(res_regs));
if (!priv->reg) {
dev_err(&pdev->dev, "unable to ioremap registers\n");
return -ENOMEM;
--
1.9.1
next prev parent reply other threads:[~2014-12-28 6:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-28 6:00 [PATCH 1/2] gpio: tz1090: Use resource_size to fix off-by-one resource size calculation Axel Lin
2014-12-28 6:01 ` Axel Lin [this message]
2015-01-02 10:25 ` [PATCH 2/2] gpio: tz1090-pdc: " James Hogan
2015-01-14 10:23 ` [PATCH 1/2] gpio: tz1090: " 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=1419746510.4496.2.camel@phoenix \
--to=axel.lin@ingics.com \
--cc=gnurou@gmail.com \
--cc=james.hogan@imgtec.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 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).