diff options
author | Axel Lin <axel.lin@ingics.com> | 2015-01-20 20:52:01 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-01-29 04:34:13 -0500 |
commit | 68d77d5168bdb922e0f100d0ee5e5e78aa0989af (patch) | |
tree | 7e590014bd8fc9e986b0e04db9d960159b71a4d9 /drivers/gpio | |
parent | 74b18de94cfb7b7a12b581015e8e317d4fa5d752 (diff) |
gpio: tz1090-pdc: 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-pdc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-tz1090-pdc.c b/drivers/gpio/gpio-tz1090-pdc.c index d7536226b847..ede7e403ffde 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) | |||
190 | 190 | ||
191 | /* Ioremap the registers */ | 191 | /* Ioremap the registers */ |
192 | priv->reg = devm_ioremap(&pdev->dev, res_regs->start, | 192 | priv->reg = devm_ioremap(&pdev->dev, res_regs->start, |
193 | res_regs->end - res_regs->start); | 193 | resource_size(res_regs)); |
194 | if (!priv->reg) { | 194 | if (!priv->reg) { |
195 | dev_err(&pdev->dev, "unable to ioremap registers\n"); | 195 | dev_err(&pdev->dev, "unable to ioremap registers\n"); |
196 | return -ENOMEM; | 196 | return -ENOMEM; |