summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2014-12-28 09:00:39 +0300
committerLinus Walleij <linus.walleij@linaro.org>2015-01-15 19:23:21 +0300
commit08b89fa20bf292b6b7cd4c7fbaa6c147d4cc9e07 (patch)
treedbfe41bcd329667253759005c5e18a4d01d0f3e4 /drivers
parenta7ce835376fd300ae4ec08f9aa3dfe6f8568111b (diff)
downloadlinux-08b89fa20bf292b6b7cd4c7fbaa6c147d4cc9e07.tar.xz
gpio: tz1090: Use resource_size to fix off-by-one
Use resource_size to fix off-by-one resource size calculation Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpio/gpio-tz1090.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-tz1090.c b/drivers/gpio/gpio-tz1090.c
index e3024bbba447..445660adc898 100644
--- a/drivers/gpio/gpio-tz1090.c
+++ b/drivers/gpio/gpio-tz1090.c
@@ -573,7 +573,7 @@ static int tz1090_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;