diff options
author | Axel Lin <axel.lin@ingics.com> | 2014-12-28 07:00:39 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-01-15 17:23:21 +0100 |
commit | 08b89fa20bf292b6b7cd4c7fbaa6c147d4cc9e07 (patch) | |
tree | dbfe41bcd329667253759005c5e18a4d01d0f3e4 /drivers/gpio | |
parent | gpio: drop owner assignment from platform_drivers (diff) | |
download | linux-08b89fa20bf292b6b7cd4c7fbaa6c147d4cc9e07.tar.xz linux-08b89fa20bf292b6b7cd4c7fbaa6c147d4cc9e07.zip |
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')
-rw-r--r-- | drivers/gpio/gpio-tz1090.c | 2 |
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; |