diff options
Diffstat (limited to 'drivers/i2c/busses/i2c-versatile.c')
-rw-r--r-- | drivers/i2c/busses/i2c-versatile.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-versatile.c b/drivers/i2c/busses/i2c-versatile.c index fede619ba227..70de82163463 100644 --- a/drivers/i2c/busses/i2c-versatile.c +++ b/drivers/i2c/busses/i2c-versatile.c | |||
@@ -76,7 +76,7 @@ static int i2c_versatile_probe(struct platform_device *dev) | |||
76 | goto err_out; | 76 | goto err_out; |
77 | } | 77 | } |
78 | 78 | ||
79 | if (!request_mem_region(r->start, r->end - r->start + 1, "versatile-i2c")) { | 79 | if (!request_mem_region(r->start, resource_size(r), "versatile-i2c")) { |
80 | ret = -EBUSY; | 80 | ret = -EBUSY; |
81 | goto err_out; | 81 | goto err_out; |
82 | } | 82 | } |
@@ -87,7 +87,7 @@ static int i2c_versatile_probe(struct platform_device *dev) | |||
87 | goto err_release; | 87 | goto err_release; |
88 | } | 88 | } |
89 | 89 | ||
90 | i2c->base = ioremap(r->start, r->end - r->start + 1); | 90 | i2c->base = ioremap(r->start, resource_size(r)); |
91 | if (!i2c->base) { | 91 | if (!i2c->base) { |
92 | ret = -ENOMEM; | 92 | ret = -ENOMEM; |
93 | goto err_free; | 93 | goto err_free; |
@@ -118,7 +118,7 @@ static int i2c_versatile_probe(struct platform_device *dev) | |||
118 | err_free: | 118 | err_free: |
119 | kfree(i2c); | 119 | kfree(i2c); |
120 | err_release: | 120 | err_release: |
121 | release_mem_region(r->start, r->end - r->start + 1); | 121 | release_mem_region(r->start, resource_size(r)); |
122 | err_out: | 122 | err_out: |
123 | return ret; | 123 | return ret; |
124 | } | 124 | } |