From 9e0c1fb29a7c257a31c321c2437617b6b4d66168 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Mon, 21 Jan 2013 11:09:14 +0100 Subject: pinctrl: 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 Cc: Linus Walleij Acked-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- drivers/pinctrl/pinctrl-falcon.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'drivers/pinctrl/pinctrl-falcon.c') diff --git a/drivers/pinctrl/pinctrl-falcon.c b/drivers/pinctrl/pinctrl-falcon.c index 8ed20e84cb02..a5d9d562d966 100644 --- a/drivers/pinctrl/pinctrl-falcon.c +++ b/drivers/pinctrl/pinctrl-falcon.c @@ -411,14 +411,11 @@ static int pinctrl_falcon_probe(struct platform_device *pdev) dev_err(&ppdev->dev, "failed to get clock\n"); return PTR_ERR(falcon_info.clk[*bank]); } - falcon_info.membase[*bank] = - devm_request_and_ioremap(&pdev->dev, &res); - if (!falcon_info.membase[*bank]) { - dev_err(&pdev->dev, - "Failed to remap memory for bank %d\n", - *bank); - return -ENOMEM; - } + falcon_info.membase[*bank] = devm_ioremap_resource(&pdev->dev, + &res); + if (IS_ERR(falcon_info.membase[*bank])) + return PTR_ERR(falcon_info.membase[*bank]); + avail = pad_r32(falcon_info.membase[*bank], LTQ_PADC_AVAIL); pins = fls(avail); -- cgit v1.2.3