diff options
| author | Patrice Chotard <patrice.chotard@st.com> | 2013-05-23 11:28:03 -0400 |
|---|---|---|
| committer | Linus Walleij <linus.walleij@linaro.org> | 2013-06-16 05:56:50 -0400 |
| commit | b0bb6426e41c092fc84c50b6daf8ffa72983a643 (patch) | |
| tree | 62844a9979e87b03fb29f17abf6b78e37664b4b1 | |
| parent | bc8d25a40577a74afd61d7a5782e0f8393c52b43 (diff) | |
pinctrl: abx500: suppress unused mutex
Suppress a mutex which was initialized on probe
and destroyed on remove but never used.
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| -rw-r--r-- | drivers/pinctrl/pinctrl-abx500.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/pinctrl/pinctrl-abx500.c b/drivers/pinctrl/pinctrl-abx500.c index 6d4532702f80..fa7a8ede19ab 100644 --- a/drivers/pinctrl/pinctrl-abx500.c +++ b/drivers/pinctrl/pinctrl-abx500.c | |||
| @@ -99,7 +99,6 @@ struct abx500_pinctrl { | |||
| 99 | struct abx500_pinctrl_soc_data *soc; | 99 | struct abx500_pinctrl_soc_data *soc; |
| 100 | struct gpio_chip chip; | 100 | struct gpio_chip chip; |
| 101 | struct ab8500 *parent; | 101 | struct ab8500 *parent; |
| 102 | struct mutex lock; | ||
| 103 | struct abx500_gpio_irq_cluster *irq_cluster; | 102 | struct abx500_gpio_irq_cluster *irq_cluster; |
| 104 | int irq_cluster_size; | 103 | int irq_cluster_size; |
| 105 | }; | 104 | }; |
| @@ -881,9 +880,6 @@ static int abx500_gpio_probe(struct platform_device *pdev) | |||
| 881 | id = (unsigned long)match->data; | 880 | id = (unsigned long)match->data; |
| 882 | } | 881 | } |
| 883 | 882 | ||
| 884 | /* initialize the lock */ | ||
| 885 | mutex_init(&pct->lock); | ||
| 886 | |||
| 887 | /* Poke in other ASIC variants here */ | 883 | /* Poke in other ASIC variants here */ |
| 888 | switch (id) { | 884 | switch (id) { |
| 889 | case PINCTRL_AB8500: | 885 | case PINCTRL_AB8500: |
| @@ -900,13 +896,11 @@ static int abx500_gpio_probe(struct platform_device *pdev) | |||
| 900 | break; | 896 | break; |
| 901 | default: | 897 | default: |
| 902 | dev_err(&pdev->dev, "Unsupported pinctrl sub driver (%d)\n", id); | 898 | dev_err(&pdev->dev, "Unsupported pinctrl sub driver (%d)\n", id); |
| 903 | mutex_destroy(&pct->lock); | ||
| 904 | return -EINVAL; | 899 | return -EINVAL; |
| 905 | } | 900 | } |
| 906 | 901 | ||
| 907 | if (!pct->soc) { | 902 | if (!pct->soc) { |
| 908 | dev_err(&pdev->dev, "Invalid SOC data\n"); | 903 | dev_err(&pdev->dev, "Invalid SOC data\n"); |
| 909 | mutex_destroy(&pct->lock); | ||
| 910 | return -EINVAL; | 904 | return -EINVAL; |
| 911 | } | 905 | } |
| 912 | 906 | ||
| @@ -917,7 +911,6 @@ static int abx500_gpio_probe(struct platform_device *pdev) | |||
| 917 | ret = gpiochip_add(&pct->chip); | 911 | ret = gpiochip_add(&pct->chip); |
| 918 | if (ret) { | 912 | if (ret) { |
| 919 | dev_err(&pdev->dev, "unable to add gpiochip: %d\n", ret); | 913 | dev_err(&pdev->dev, "unable to add gpiochip: %d\n", ret); |
| 920 | mutex_destroy(&pct->lock); | ||
| 921 | return ret; | 914 | return ret; |
| 922 | } | 915 | } |
| 923 | dev_info(&pdev->dev, "added gpiochip\n"); | 916 | dev_info(&pdev->dev, "added gpiochip\n"); |
| @@ -954,7 +947,6 @@ out_rem_chip: | |||
| 954 | if (err) | 947 | if (err) |
| 955 | dev_info(&pdev->dev, "failed to remove gpiochip\n"); | 948 | dev_info(&pdev->dev, "failed to remove gpiochip\n"); |
| 956 | 949 | ||
| 957 | mutex_destroy(&pct->lock); | ||
| 958 | return ret; | 950 | return ret; |
| 959 | } | 951 | } |
| 960 | 952 | ||
| @@ -974,8 +966,6 @@ static int abx500_gpio_remove(struct platform_device *pdev) | |||
| 974 | return ret; | 966 | return ret; |
| 975 | } | 967 | } |
| 976 | 968 | ||
| 977 | mutex_destroy(&pct->lock); | ||
| 978 | |||
| 979 | return 0; | 969 | return 0; |
| 980 | } | 970 | } |
| 981 | 971 | ||
