diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 11:09:03 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-24 13:33:23 -0800 |
commit | 84dbf809fbae0591d319a7ea76e6032ff434824c (patch) | |
tree | ab744305093c72ec795d8f873229e5d9fbff0316 /drivers/i2c/busses/i2c-stu300.c | |
parent | f4a18312f46a6c6e0ba7b81776b01fc36edea9fc (diff) | |
download | op-kernel-dev-84dbf809fbae0591d319a7ea76e6032ff434824c.zip op-kernel-dev-84dbf809fbae0591d319a7ea76e6032ff434824c.tar.gz |
i2c: Convert to devm_ioremap_resource()
Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.
devm_ioremap_resource() provides its own error messages so all explicit
error messages can be removed from the failure code paths.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/i2c/busses/i2c-stu300.c')
-rw-r--r-- | drivers/i2c/busses/i2c-stu300.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-stu300.c b/drivers/i2c/busses/i2c-stu300.c index 580a0c0..60195b5 100644 --- a/drivers/i2c/busses/i2c-stu300.c +++ b/drivers/i2c/busses/i2c-stu300.c @@ -888,11 +888,11 @@ stu300_probe(struct platform_device *pdev) if (!res) return -ENOENT; - dev->virtbase = devm_request_and_ioremap(&pdev->dev, res); + dev->virtbase = devm_ioremap_resource(&pdev->dev, res); dev_dbg(&pdev->dev, "initialize bus device I2C%d on virtual " "base %p\n", bus_nr, dev->virtbase); - if (!dev->virtbase) - return -ENOMEM; + if (IS_ERR(dev->virtbase)) + return PTR_ERR(dev->virtbase); dev->irq = platform_get_irq(pdev, 0); ret = devm_request_irq(&pdev->dev, dev->irq, stu300_irh, 0, NAME, dev); |