diff options
Diffstat (limited to 'drivers/i2c/busses/i2c-ocores.c')
-rw-r--r-- | drivers/i2c/busses/i2c-ocores.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c index a873d0ad1acb..a337d08a392d 100644 --- a/drivers/i2c/busses/i2c-ocores.c +++ b/drivers/i2c/busses/i2c-ocores.c | |||
@@ -12,6 +12,7 @@ | |||
12 | * kind, whether express or implied. | 12 | * kind, whether express or implied. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/err.h> | ||
15 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
16 | #include <linux/module.h> | 17 | #include <linux/module.h> |
17 | #include <linux/init.h> | 18 | #include <linux/init.h> |
@@ -364,9 +365,9 @@ static int ocores_i2c_probe(struct platform_device *pdev) | |||
364 | if (!i2c) | 365 | if (!i2c) |
365 | return -ENOMEM; | 366 | return -ENOMEM; |
366 | 367 | ||
367 | i2c->base = devm_request_and_ioremap(&pdev->dev, res); | 368 | i2c->base = devm_ioremap_resource(&pdev->dev, res); |
368 | if (!i2c->base) | 369 | if (IS_ERR(i2c->base)) |
369 | return -EADDRNOTAVAIL; | 370 | return PTR_ERR(i2c->base); |
370 | 371 | ||
371 | pdata = pdev->dev.platform_data; | 372 | pdata = pdev->dev.platform_data; |
372 | if (pdata) { | 373 | if (pdata) { |