summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/spear
diff options
context:
space:
mode:
authorWolfram Sang <wsa@the-dreams.de>2013-05-10 10:17:04 +0200
committerLinus Walleij <linus.walleij@linaro.org>2013-06-16 11:56:49 +0200
commit8ec136d0f3d6376ce347255fb3d29708f28cc00a (patch)
treee9dfb64b8a1de49ebfa1fff3c8510e53eb729d10 /drivers/pinctrl/spear
parent4fdf774fc924d48e3f789243950854c87e05c26c (diff)
downloadlinux-8ec136d0f3d6376ce347255fb3d29708f28cc00a.tar.bz2
drivers/pinctrl/spear: 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: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/spear')
-rw-r--r--drivers/pinctrl/spear/pinctrl-plgpio.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/pinctrl/spear/pinctrl-plgpio.c b/drivers/pinctrl/spear/pinctrl-plgpio.c
index 3e5a887216b8..6b090be61774 100644
--- a/drivers/pinctrl/spear/pinctrl-plgpio.c
+++ b/drivers/pinctrl/spear/pinctrl-plgpio.c
@@ -528,18 +528,13 @@ static int plgpio_probe(struct platform_device *pdev)
struct resource *res;
int ret, irq, i;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res) {
- dev_err(&pdev->dev, "invalid IORESOURCE_MEM\n");
- return -EBUSY;
- }
-
plgpio = devm_kzalloc(&pdev->dev, sizeof(*plgpio), GFP_KERNEL);
if (!plgpio) {
dev_err(&pdev->dev, "memory allocation fail\n");
return -ENOMEM;
}
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
plgpio->base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(plgpio->base))
return PTR_ERR(plgpio->base);