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-exynos5440.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'drivers/pinctrl/pinctrl-exynos5440.c') diff --git a/drivers/pinctrl/pinctrl-exynos5440.c b/drivers/pinctrl/pinctrl-exynos5440.c index de05b64f0da..5e77242cb0d 100644 --- a/drivers/pinctrl/pinctrl-exynos5440.c +++ b/drivers/pinctrl/pinctrl-exynos5440.c @@ -866,11 +866,9 @@ static int exynos5440_pinctrl_probe(struct platform_device *pdev) return -ENOENT; } - priv->reg_base = devm_request_and_ioremap(&pdev->dev, res); - if (!priv->reg_base) { - dev_err(dev, "ioremap failed\n"); - return -ENODEV; - } + priv->reg_base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(priv->reg_base)) + return PTR_ERR(priv->reg_base); ret = exynos5440_gpiolib_register(pdev, priv); if (ret) -- cgit v1.2.3-70-g09d2