Skip to contentSkip to conversation

pinctrl: abx500: suppress unused mutex

PATCH In review [email protected] 2 participants 2 messages May 23, 2013 – May 24, 2013 Pin control

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pinctrl: abx500: suppress unused mutex

From: Patrice Chotard <[email protected]>

Suppress a mutex which was initialized on probe
and destroyed on remove but never used.

---
 drivers/pinctrl/pinctrl-abx500.c |    9 ---------
 1 file changed, 9 deletions(-)
drivers/pinctrl/pinctrl-abx500.c +0 -9
index aa17f75..bbada4b 100644
@@ -99,7 +99,6 @@ struct abx500_pinctrl {
 	struct abx500_pinctrl_soc_data *soc;
 	struct gpio_chip chip;
 	struct ab8500 *parent;
-	struct mutex lock;
 	struct abx500_gpio_irq_cluster *irq_cluster;
 	int irq_cluster_size;
 };
@@ -882,8 +881,6 @@ static int abx500_gpio_probe(struct platform_device *pdev)
 	pct->chip.dev = &pdev->dev;
 	pct->chip.base = (np) ? -1 : pdata->gpio_base;
 
-	/* initialize the lock */
-	mutex_init(&pct->lock);
 
 	/* Poke in other ASIC variants here */
 	switch (id) {
@@ -902,13 +899,11 @@ static int abx500_gpio_probe(struct platform_device *pdev)
 	default:
 		dev_err(&pdev->dev, "Unsupported pinctrl sub driver (%d)\n",
 				(int) platid->driver_data);
-		mutex_destroy(&pct->lock);
 		return -EINVAL;
 	}
 
 	if (!pct->soc) {
 		dev_err(&pdev->dev, "Invalid SOC data\n");
-		mutex_destroy(&pct->lock);
 		return -EINVAL;
 	}
 
@@ -919,7 +914,6 @@ static int abx500_gpio_probe(struct platform_device *pdev)
 	ret = gpiochip_add(&pct->chip);
 	if (ret) {
 		dev_err(&pdev->dev, "unable to add gpiochip: %d\n", ret);
-		mutex_destroy(&pct->lock);
 		return ret;
 	}
 	dev_info(&pdev->dev, "added gpiochip\n");
@@ -956,7 +950,6 @@ out_rem_chip:
 	if (err)
 		dev_info(&pdev->dev, "failed to remove gpiochip\n");
 
-	mutex_destroy(&pct->lock);
 	return ret;
 }
 
@@ -976,8 +969,6 @@ static int abx500_gpio_remove(struct platform_device *pdev)
 		return ret;
 	}
 
-	mutex_destroy(&pct->lock);
-
 	return 0;
 }
 
Signature · 1 line
1.7.10
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · On Thu, 23 May 2013, [email protected] wrote:

From: Patrice Chotard <[email protected]>

Suppress a mutex which was initialized on probe
and destroyed on remove but never used.

---
 drivers/pinctrl/pinctrl-abx500.c |    9 ---------
 1 file changed, 9 deletions(-)
Signature · 4 lines
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog