gpio: tz1090-pdc: Use resource_size to fix off-by-one resource size calculation

Signed-off-by: Axel Lin <[email protected]>
Acked-by: James Hogan <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
Axel Lin 2015-01-21 09:52:01 +08:00 • committed by Linus Walleij
commit 68d77d5168

View file

@ -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;