summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-tz1090.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2014-12-28 14:00:39 +0800
committerLinus Walleij <linus.walleij@linaro.org>2015-01-15 17:23:21 +0100
commit08b89fa20bf292b6b7cd4c7fbaa6c147d4cc9e07 (patch)
treedbfe41bcd329667253759005c5e18a4d01d0f3e4 /drivers/gpio/gpio-tz1090.c
parenta7ce835376fd300ae4ec08f9aa3dfe6f8568111b (diff)
downloadop-kernel-dev-08b89fa20bf292b6b7cd4c7fbaa6c147d4cc9e07.zip
op-kernel-dev-08b89fa20bf292b6b7cd4c7fbaa6c147d4cc9e07.tar.gz
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/gpio/gpio-tz1090.c')
-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 e3024bb..445660a 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;
OpenPOWER on IntegriCloud