diff options
| -rw-r--r-- | drivers/gpio/gpio-mvebu.c | 6 | ||||
| -rw-r--r-- | drivers/gpio/gpio-samsung.c | 14 |
2 files changed, 7 insertions, 13 deletions
diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c index 7d9bd94be8d2..6819d63cb167 100644 --- a/drivers/gpio/gpio-mvebu.c +++ b/drivers/gpio/gpio-mvebu.c | |||
| @@ -547,7 +547,6 @@ static int mvebu_gpio_probe(struct platform_device *pdev) | |||
| 547 | mvchip->membase = devm_request_and_ioremap(&pdev->dev, res); | 547 | mvchip->membase = devm_request_and_ioremap(&pdev->dev, res); |
| 548 | if (! mvchip->membase) { | 548 | if (! mvchip->membase) { |
| 549 | dev_err(&pdev->dev, "Cannot ioremap\n"); | 549 | dev_err(&pdev->dev, "Cannot ioremap\n"); |
| 550 | kfree(mvchip->chip.label); | ||
| 551 | return -ENOMEM; | 550 | return -ENOMEM; |
| 552 | } | 551 | } |
| 553 | 552 | ||
| @@ -557,14 +556,12 @@ static int mvebu_gpio_probe(struct platform_device *pdev) | |||
| 557 | res = platform_get_resource(pdev, IORESOURCE_MEM, 1); | 556 | res = platform_get_resource(pdev, IORESOURCE_MEM, 1); |
| 558 | if (! res) { | 557 | if (! res) { |
| 559 | dev_err(&pdev->dev, "Cannot get memory resource\n"); | 558 | dev_err(&pdev->dev, "Cannot get memory resource\n"); |
| 560 | kfree(mvchip->chip.label); | ||
| 561 | return -ENODEV; | 559 | return -ENODEV; |
| 562 | } | 560 | } |
| 563 | 561 | ||
| 564 | mvchip->percpu_membase = devm_request_and_ioremap(&pdev->dev, res); | 562 | mvchip->percpu_membase = devm_request_and_ioremap(&pdev->dev, res); |
| 565 | if (! mvchip->percpu_membase) { | 563 | if (! mvchip->percpu_membase) { |
| 566 | dev_err(&pdev->dev, "Cannot ioremap\n"); | 564 | dev_err(&pdev->dev, "Cannot ioremap\n"); |
| 567 | kfree(mvchip->chip.label); | ||
| 568 | return -ENOMEM; | 565 | return -ENOMEM; |
| 569 | } | 566 | } |
| 570 | } | 567 | } |
| @@ -625,7 +622,6 @@ static int mvebu_gpio_probe(struct platform_device *pdev) | |||
| 625 | mvchip->irqbase = irq_alloc_descs(-1, 0, ngpios, -1); | 622 | mvchip->irqbase = irq_alloc_descs(-1, 0, ngpios, -1); |
| 626 | if (mvchip->irqbase < 0) { | 623 | if (mvchip->irqbase < 0) { |
| 627 | dev_err(&pdev->dev, "no irqs\n"); | 624 | dev_err(&pdev->dev, "no irqs\n"); |
| 628 | kfree(mvchip->chip.label); | ||
| 629 | return -ENOMEM; | 625 | return -ENOMEM; |
| 630 | } | 626 | } |
| 631 | 627 | ||
| @@ -633,7 +629,6 @@ static int mvebu_gpio_probe(struct platform_device *pdev) | |||
| 633 | mvchip->membase, handle_level_irq); | 629 | mvchip->membase, handle_level_irq); |
| 634 | if (! gc) { | 630 | if (! gc) { |
| 635 | dev_err(&pdev->dev, "Cannot allocate generic irq_chip\n"); | 631 | dev_err(&pdev->dev, "Cannot allocate generic irq_chip\n"); |
| 636 | kfree(mvchip->chip.label); | ||
| 637 | return -ENOMEM; | 632 | return -ENOMEM; |
| 638 | } | 633 | } |
| 639 | 634 | ||
| @@ -668,7 +663,6 @@ static int mvebu_gpio_probe(struct platform_device *pdev) | |||
| 668 | irq_remove_generic_chip(gc, IRQ_MSK(ngpios), IRQ_NOREQUEST, | 663 | irq_remove_generic_chip(gc, IRQ_MSK(ngpios), IRQ_NOREQUEST, |
| 669 | IRQ_LEVEL | IRQ_NOPROBE); | 664 | IRQ_LEVEL | IRQ_NOPROBE); |
| 670 | kfree(gc); | 665 | kfree(gc); |
| 671 | kfree(mvchip->chip.label); | ||
| 672 | return -ENODEV; | 666 | return -ENODEV; |
| 673 | } | 667 | } |
| 674 | 668 | ||
diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c index 01f7fe955590..76be7eed79de 100644 --- a/drivers/gpio/gpio-samsung.c +++ b/drivers/gpio/gpio-samsung.c | |||
| @@ -32,7 +32,6 @@ | |||
| 32 | 32 | ||
| 33 | #include <mach/hardware.h> | 33 | #include <mach/hardware.h> |
| 34 | #include <mach/map.h> | 34 | #include <mach/map.h> |
| 35 | #include <mach/regs-clock.h> | ||
| 36 | #include <mach/regs-gpio.h> | 35 | #include <mach/regs-gpio.h> |
| 37 | 36 | ||
| 38 | #include <plat/cpu.h> | 37 | #include <plat/cpu.h> |
| @@ -446,7 +445,7 @@ static struct samsung_gpio_cfg s3c24xx_gpiocfg_banka = { | |||
| 446 | }; | 445 | }; |
| 447 | #endif | 446 | #endif |
| 448 | 447 | ||
| 449 | #if defined(CONFIG_ARCH_EXYNOS4) || defined(CONFIG_ARCH_EXYNOS5) | 448 | #if defined(CONFIG_ARCH_EXYNOS4) || defined(CONFIG_SOC_EXYNOS5250) |
| 450 | static struct samsung_gpio_cfg exynos_gpio_cfg = { | 449 | static struct samsung_gpio_cfg exynos_gpio_cfg = { |
| 451 | .set_pull = exynos_gpio_setpull, | 450 | .set_pull = exynos_gpio_setpull, |
| 452 | .get_pull = exynos_gpio_getpull, | 451 | .get_pull = exynos_gpio_getpull, |
| @@ -2446,7 +2445,7 @@ static struct samsung_gpio_chip exynos4_gpios_3[] = { | |||
| 2446 | }; | 2445 | }; |
| 2447 | #endif | 2446 | #endif |
| 2448 | 2447 | ||
| 2449 | #ifdef CONFIG_ARCH_EXYNOS5 | 2448 | #ifdef CONFIG_SOC_EXYNOS5250 |
| 2450 | static struct samsung_gpio_chip exynos5_gpios_1[] = { | 2449 | static struct samsung_gpio_chip exynos5_gpios_1[] = { |
| 2451 | { | 2450 | { |
| 2452 | .chip = { | 2451 | .chip = { |
| @@ -2614,7 +2613,7 @@ static struct samsung_gpio_chip exynos5_gpios_1[] = { | |||
| 2614 | }; | 2613 | }; |
| 2615 | #endif | 2614 | #endif |
| 2616 | 2615 | ||
| 2617 | #ifdef CONFIG_ARCH_EXYNOS5 | 2616 | #ifdef CONFIG_SOC_EXYNOS5250 |
| 2618 | static struct samsung_gpio_chip exynos5_gpios_2[] = { | 2617 | static struct samsung_gpio_chip exynos5_gpios_2[] = { |
| 2619 | { | 2618 | { |
| 2620 | .chip = { | 2619 | .chip = { |
| @@ -2675,7 +2674,7 @@ static struct samsung_gpio_chip exynos5_gpios_2[] = { | |||
| 2675 | }; | 2674 | }; |
| 2676 | #endif | 2675 | #endif |
| 2677 | 2676 | ||
| 2678 | #ifdef CONFIG_ARCH_EXYNOS5 | 2677 | #ifdef CONFIG_SOC_EXYNOS5250 |
| 2679 | static struct samsung_gpio_chip exynos5_gpios_3[] = { | 2678 | static struct samsung_gpio_chip exynos5_gpios_3[] = { |
| 2680 | { | 2679 | { |
| 2681 | .chip = { | 2680 | .chip = { |
| @@ -2711,7 +2710,7 @@ static struct samsung_gpio_chip exynos5_gpios_3[] = { | |||
| 2711 | }; | 2710 | }; |
| 2712 | #endif | 2711 | #endif |
| 2713 | 2712 | ||
| 2714 | #ifdef CONFIG_ARCH_EXYNOS5 | 2713 | #ifdef CONFIG_SOC_EXYNOS5250 |
| 2715 | static struct samsung_gpio_chip exynos5_gpios_4[] = { | 2714 | static struct samsung_gpio_chip exynos5_gpios_4[] = { |
| 2716 | { | 2715 | { |
| 2717 | .chip = { | 2716 | .chip = { |
| @@ -3010,7 +3009,7 @@ static __init int samsung_gpiolib_init(void) | |||
| 3010 | int i, nr_chips; | 3009 | int i, nr_chips; |
| 3011 | int group = 0; | 3010 | int group = 0; |
| 3012 | 3011 | ||
| 3013 | #ifdef CONFIG_PINCTRL_SAMSUNG | 3012 | #if defined(CONFIG_PINCTRL_EXYNOS) || defined(CONFIG_PINCTRL_EXYNOS5440) |
| 3014 | /* | 3013 | /* |
| 3015 | * This gpio driver includes support for device tree support and there | 3014 | * This gpio driver includes support for device tree support and there |
| 3016 | * are platforms using it. In order to maintain compatibility with those | 3015 | * are platforms using it. In order to maintain compatibility with those |
| @@ -3026,6 +3025,7 @@ static __init int samsung_gpiolib_init(void) | |||
| 3026 | static const struct of_device_id exynos_pinctrl_ids[] = { | 3025 | static const struct of_device_id exynos_pinctrl_ids[] = { |
| 3027 | { .compatible = "samsung,pinctrl-exynos4210", }, | 3026 | { .compatible = "samsung,pinctrl-exynos4210", }, |
| 3028 | { .compatible = "samsung,pinctrl-exynos4x12", }, | 3027 | { .compatible = "samsung,pinctrl-exynos4x12", }, |
| 3028 | { .compatible = "samsung,pinctrl-exynos5440", }, | ||
| 3029 | }; | 3029 | }; |
| 3030 | for_each_matching_node(pctrl_np, exynos_pinctrl_ids) | 3030 | for_each_matching_node(pctrl_np, exynos_pinctrl_ids) |
| 3031 | if (pctrl_np && of_device_is_available(pctrl_np)) | 3031 | if (pctrl_np && of_device_is_available(pctrl_np)) |
