Commit b0bb6426 authored by Patrice Chotard's avatar Patrice Chotard Committed by Linus Walleij

pinctrl: abx500: suppress unused mutex

Suppress a mutex which was initialized on probe
and destroyed on remove but never used.
Signed-off-by: default avatarPatrice Chotard <patrice.chotard@st.com>
Acked-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent bc8d25a4
...@@ -99,7 +99,6 @@ struct abx500_pinctrl { ...@@ -99,7 +99,6 @@ struct abx500_pinctrl {
struct abx500_pinctrl_soc_data *soc; struct abx500_pinctrl_soc_data *soc;
struct gpio_chip chip; struct gpio_chip chip;
struct ab8500 *parent; struct ab8500 *parent;
struct mutex lock;
struct abx500_gpio_irq_cluster *irq_cluster; struct abx500_gpio_irq_cluster *irq_cluster;
int irq_cluster_size; int irq_cluster_size;
}; };
...@@ -881,9 +880,6 @@ static int abx500_gpio_probe(struct platform_device *pdev) ...@@ -881,9 +880,6 @@ static int abx500_gpio_probe(struct platform_device *pdev)
id = (unsigned long)match->data; id = (unsigned long)match->data;
} }
/* initialize the lock */
mutex_init(&pct->lock);
/* Poke in other ASIC variants here */ /* Poke in other ASIC variants here */
switch (id) { switch (id) {
case PINCTRL_AB8500: case PINCTRL_AB8500:
...@@ -900,13 +896,11 @@ static int abx500_gpio_probe(struct platform_device *pdev) ...@@ -900,13 +896,11 @@ static int abx500_gpio_probe(struct platform_device *pdev)
break; break;
default: default:
dev_err(&pdev->dev, "Unsupported pinctrl sub driver (%d)\n", id); dev_err(&pdev->dev, "Unsupported pinctrl sub driver (%d)\n", id);
mutex_destroy(&pct->lock);
return -EINVAL; return -EINVAL;
} }
if (!pct->soc) { if (!pct->soc) {
dev_err(&pdev->dev, "Invalid SOC data\n"); dev_err(&pdev->dev, "Invalid SOC data\n");
mutex_destroy(&pct->lock);
return -EINVAL; return -EINVAL;
} }
...@@ -917,7 +911,6 @@ static int abx500_gpio_probe(struct platform_device *pdev) ...@@ -917,7 +911,6 @@ static int abx500_gpio_probe(struct platform_device *pdev)
ret = gpiochip_add(&pct->chip); ret = gpiochip_add(&pct->chip);
if (ret) { if (ret) {
dev_err(&pdev->dev, "unable to add gpiochip: %d\n", ret); dev_err(&pdev->dev, "unable to add gpiochip: %d\n", ret);
mutex_destroy(&pct->lock);
return ret; return ret;
} }
dev_info(&pdev->dev, "added gpiochip\n"); dev_info(&pdev->dev, "added gpiochip\n");
...@@ -954,7 +947,6 @@ static int abx500_gpio_probe(struct platform_device *pdev) ...@@ -954,7 +947,6 @@ static int abx500_gpio_probe(struct platform_device *pdev)
if (err) if (err)
dev_info(&pdev->dev, "failed to remove gpiochip\n"); dev_info(&pdev->dev, "failed to remove gpiochip\n");
mutex_destroy(&pct->lock);
return ret; return ret;
} }
...@@ -974,8 +966,6 @@ static int abx500_gpio_remove(struct platform_device *pdev) ...@@ -974,8 +966,6 @@ static int abx500_gpio_remove(struct platform_device *pdev)
return ret; return ret;
} }
mutex_destroy(&pct->lock);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment