From 84dbf809fbae0591d319a7ea76e6032ff434824c Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Mon, 21 Jan 2013 11:09:03 +0100 Subject: 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 Acked-by: Wolfram Sang Cc: Ben Dooks Signed-off-by: Greg Kroah-Hartman --- drivers/i2c/busses/i2c-sirf.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'drivers/i2c/busses/i2c-sirf.c') diff --git a/drivers/i2c/busses/i2c-sirf.c b/drivers/i2c/busses/i2c-sirf.c index 3f1818b8797..183cf05be1d 100644 --- a/drivers/i2c/busses/i2c-sirf.c +++ b/drivers/i2c/busses/i2c-sirf.c @@ -308,10 +308,9 @@ static int i2c_sirfsoc_probe(struct platform_device *pdev) goto out; } - siic->base = devm_request_and_ioremap(&pdev->dev, mem_res); - if (siic->base == NULL) { - dev_err(&pdev->dev, "IO remap failed!\n"); - err = -ENOMEM; + siic->base = devm_ioremap_resource(&pdev->dev, mem_res); + if (IS_ERR(siic->base)) { + err = PTR_ERR(siic->base); goto out; } -- cgit v1.2.3-70-g09d2