diff options
Diffstat (limited to 'drivers/i2c/busses/i2c-bfin-twi.c')
-rw-r--r-- | drivers/i2c/busses/i2c-bfin-twi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-bfin-twi.c b/drivers/i2c/busses/i2c-bfin-twi.c index 9fb114c274a..b309ac2c3d5 100644 --- a/drivers/i2c/busses/i2c-bfin-twi.c +++ b/drivers/i2c/busses/i2c-bfin-twi.c @@ -652,7 +652,7 @@ static int i2c_bfin_twi_probe(struct platform_device *pdev) goto out_error_get_res; } - iface->regs_base = ioremap(res->start, res->end - res->start + 1); + iface->regs_base = ioremap(res->start, resource_size(res)); if (iface->regs_base == NULL) { dev_err(&pdev->dev, "Cannot map IO\n"); rc = -ENXIO; |