diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2013-05-10 04:17:03 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-06-16 05:56:49 -0400 |
commit | f50b9e12db1fbe3cef9e819e87955e0c99662a03 (patch) | |
tree | 07f14556c1f0422db30f1f092ea6d6000bb18557 | |
parent | dbf850c68742c5fc884c39efe0a2a344d50f3344 (diff) |
drivers/pinctrl: don't check resource with devm_ioremap_resource
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>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | drivers/pinctrl/pinctrl-at91.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c index 5d7529ed5392..b90a3a0ac534 100644 --- a/drivers/pinctrl/pinctrl-at91.c +++ b/drivers/pinctrl/pinctrl-at91.c | |||
@@ -1543,12 +1543,6 @@ static int at91_gpio_probe(struct platform_device *pdev) | |||
1543 | goto err; | 1543 | goto err; |
1544 | } | 1544 | } |
1545 | 1545 | ||
1546 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
1547 | if (!res) { | ||
1548 | ret = -ENOENT; | ||
1549 | goto err; | ||
1550 | } | ||
1551 | |||
1552 | irq = platform_get_irq(pdev, 0); | 1546 | irq = platform_get_irq(pdev, 0); |
1553 | if (irq < 0) { | 1547 | if (irq < 0) { |
1554 | ret = irq; | 1548 | ret = irq; |
@@ -1561,6 +1555,7 @@ static int at91_gpio_probe(struct platform_device *pdev) | |||
1561 | goto err; | 1555 | goto err; |
1562 | } | 1556 | } |
1563 | 1557 | ||
1558 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
1564 | at91_chip->regbase = devm_ioremap_resource(&pdev->dev, res); | 1559 | at91_chip->regbase = devm_ioremap_resource(&pdev->dev, res); |
1565 | if (IS_ERR(at91_chip->regbase)) { | 1560 | if (IS_ERR(at91_chip->regbase)) { |
1566 | ret = PTR_ERR(at91_chip->regbase); | 1561 | ret = PTR_ERR(at91_chip->regbase); |