aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-bfin-twi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/busses/i2c-bfin-twi.c')
-rw-r--r--drivers/i2c/busses/i2c-bfin-twi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-bfin-twi.c b/drivers/i2c/busses/i2c-bfin-twi.c
index 26d8987e69bf..b309ac2c3d5c 100644
--- a/drivers/i2c/busses/i2c-bfin-twi.c
+++ b/drivers/i2c/busses/i2c-bfin-twi.c
@@ -12,6 +12,7 @@
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/i2c.h> 14#include <linux/i2c.h>
15#include <linux/io.h>
15#include <linux/mm.h> 16#include <linux/mm.h>
16#include <linux/timer.h> 17#include <linux/timer.h>
17#include <linux/spinlock.h> 18#include <linux/spinlock.h>
@@ -651,7 +652,7 @@ static int i2c_bfin_twi_probe(struct platform_device *pdev)
651 goto out_error_get_res; 652 goto out_error_get_res;
652 } 653 }
653 654
654 iface->regs_base = ioremap(res->start, res->end - res->start + 1); 655 iface->regs_base = ioremap(res->start, resource_size(res));
655 if (iface->regs_base == NULL) { 656 if (iface->regs_base == NULL) {
656 dev_err(&pdev->dev, "Cannot map IO\n"); 657 dev_err(&pdev->dev, "Cannot map IO\n");
657 rc = -ENXIO; 658 rc = -ENXIO;