diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2013-05-10 04:17:04 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-06-16 05:56:49 -0400 |
commit | 8ec136d0f3d6376ce347255fb3d29708f28cc00a (patch) | |
tree | e9dfb64b8a1de49ebfa1fff3c8510e53eb729d10 /drivers/pinctrl/spear | |
parent | 4fdf774fc924d48e3f789243950854c87e05c26c (diff) |
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.c | 7 |
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) | |||
528 | struct resource *res; | 528 | struct resource *res; |
529 | int ret, irq, i; | 529 | int ret, irq, i; |
530 | 530 | ||
531 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
532 | if (!res) { | ||
533 | dev_err(&pdev->dev, "invalid IORESOURCE_MEM\n"); | ||
534 | return -EBUSY; | ||
535 | } | ||
536 | |||
537 | plgpio = devm_kzalloc(&pdev->dev, sizeof(*plgpio), GFP_KERNEL); | 531 | plgpio = devm_kzalloc(&pdev->dev, sizeof(*plgpio), GFP_KERNEL); |
538 | if (!plgpio) { | 532 | if (!plgpio) { |
539 | dev_err(&pdev->dev, "memory allocation fail\n"); | 533 | dev_err(&pdev->dev, "memory allocation fail\n"); |
540 | return -ENOMEM; | 534 | return -ENOMEM; |
541 | } | 535 | } |
542 | 536 | ||
537 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
543 | plgpio->base = devm_ioremap_resource(&pdev->dev, res); | 538 | plgpio->base = devm_ioremap_resource(&pdev->dev, res); |
544 | if (IS_ERR(plgpio->base)) | 539 | if (IS_ERR(plgpio->base)) |
545 | return PTR_ERR(plgpio->base); | 540 | return PTR_ERR(plgpio->base); |