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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
f4a18312f4
commit
84dbf809fb
@@ -723,9 +723,9 @@ static int at91_twi_probe(struct platform_device *pdev)
|
||||
if (!dev->pdata)
|
||||
return -ENODEV;
|
||||
|
||||
dev->base = devm_request_and_ioremap(&pdev->dev, mem);
|
||||
if (!dev->base)
|
||||
return -EBUSY;
|
||||
dev->base = devm_ioremap_resource(&pdev->dev, mem);
|
||||
if (IS_ERR(dev->base))
|
||||
return PTR_ERR(dev->base);
|
||||
|
||||
dev->irq = platform_get_irq(pdev, 0);
|
||||
if (dev->irq < 0)
|
||||
|
Reference in New Issue
Block a user