drivers/pinctrl: don't check resource with devm_ioremap_resource
authorWolfram Sang <wsa@the-dreams.de>
Sun, 12 May 2013 13:19:50 +0000 (15:19 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Sat, 18 May 2013 09:55:56 +0000 (11:55 +0200)
devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/pinctrl/pinctrl-coh901.c
drivers/pinctrl/pinctrl-exynos5440.c
drivers/pinctrl/pinctrl-samsung.c
drivers/pinctrl/pinctrl-xway.c

index edde3acc41864b5d9770be7696e553558d428902..a67af419f5317b3ddd7ad4d777bcc49d30142dec 100644 (file)
@@ -713,11 +713,6 @@ static int __init u300_gpio_probe(struct platform_device *pdev)
        gpio->dev = &pdev->dev;
 
        memres = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (!memres) {
-               dev_err(gpio->dev, "could not get GPIO memory resource\n");
-               return -ENODEV;
-       }
-
        gpio->base = devm_ioremap_resource(&pdev->dev, memres);
        if (IS_ERR(gpio->base))
                return PTR_ERR(gpio->base);
index 6038503ed929cc5c9332e7f4903412cf2d1d3611..32a48f44f574264f5c1b320e00db8065f1ba0616 100644 (file)
@@ -1000,11 +1000,6 @@ static int exynos5440_pinctrl_probe(struct platform_device *pdev)
        }
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (!res) {
-               dev_err(dev, "cannot find IO resource\n");
-               return -ENOENT;
-       }
-
        priv->reg_base = devm_ioremap_resource(&pdev->dev, res);
        if (IS_ERR(priv->reg_base))
                return PTR_ERR(priv->reg_base);
index 976366899f68831f6765f1422ce996a1c8dec3b8..055d0162098ba3da211fcee48f7d334c4def092c 100644 (file)
@@ -932,11 +932,6 @@ static int samsung_pinctrl_probe(struct platform_device *pdev)
        drvdata->dev = dev;
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (!res) {
-               dev_err(dev, "cannot find IO resource\n");
-               return -ENOENT;
-       }
-
        drvdata->virt_base = devm_ioremap_resource(&pdev->dev, res);
        if (IS_ERR(drvdata->virt_base))
                return PTR_ERR(drvdata->virt_base);
index f2977cff8366f4b89f88987f1080039a39f2f110..e92132c76a6b56cf02415f18b890c259f377c404 100644 (file)
@@ -716,10 +716,6 @@ static int pinmux_xway_probe(struct platform_device *pdev)
 
        /* get and remap our register range */
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (!res) {
-               dev_err(&pdev->dev, "Failed to get resource\n");
-               return -ENOENT;
-       }
        xway_info.membase[0] = devm_ioremap_resource(&pdev->dev, res);
        if (IS_ERR(xway_info.membase[0]))
                return PTR_ERR(xway_info.membase[0]);