diff options
Diffstat (limited to 'drivers/i2c/busses/i2c-xlr.c')
-rw-r--r-- | drivers/i2c/busses/i2c-xlr.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/i2c/busses/i2c-xlr.c b/drivers/i2c/busses/i2c-xlr.c index 86010293e23c..7945b05d3ea0 100644 --- a/drivers/i2c/busses/i2c-xlr.c +++ b/drivers/i2c/busses/i2c-xlr.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * warranty of any kind, whether express or implied. | 7 | * warranty of any kind, whether express or implied. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/err.h> | ||
10 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
11 | #include <linux/module.h> | 12 | #include <linux/module.h> |
12 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
@@ -225,11 +226,9 @@ static int xlr_i2c_probe(struct platform_device *pdev) | |||
225 | return -ENOMEM; | 226 | return -ENOMEM; |
226 | 227 | ||
227 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 228 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
228 | priv->iobase = devm_request_and_ioremap(&pdev->dev, res); | 229 | priv->iobase = devm_ioremap_resource(&pdev->dev, res); |
229 | if (!priv->iobase) { | 230 | if (IS_ERR(priv->iobase)) |
230 | dev_err(&pdev->dev, "devm_request_and_ioremap failed\n"); | 231 | return PTR_ERR(priv->iobase); |
231 | return -EBUSY; | ||
232 | } | ||
233 | 232 | ||
234 | priv->adap.dev.parent = &pdev->dev; | 233 | priv->adap.dev.parent = &pdev->dev; |
235 | priv->adap.owner = THIS_MODULE; | 234 | priv->adap.owner = THIS_MODULE; |