[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1369323102-3030-1-git-send-email-patrice.chotard.st@gmail.com>
Date: Thu, 23 May 2013 17:31:42 +0200
From: <patrice.chotard.st@...il.com>
To: <linux-kernel@...r.kernel.org>, <linus.walleij@...aro.org>
Cc: Lee Jones <lee.jones@...aro.org>, <fabio.baltieri@...aro.org>,
Patrice Chotard <patrice.chotard@...com>
Subject: [PATCH] pinctrl: abx500: suppress unused mutex
From: Patrice Chotard <patrice.chotard@...com>
Suppress a mutex which was initialized on probe
and destroyed on remove but never used.
Signed-off-by: Patrice Chotard <patrice.chotard@...com>
---
drivers/pinctrl/pinctrl-abx500.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-abx500.c b/drivers/pinctrl/pinctrl-abx500.c
index aa17f75..bbada4b 100644
--- a/drivers/pinctrl/pinctrl-abx500.c
+++ b/drivers/pinctrl/pinctrl-abx500.c
@@ -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;
}
--
1.7.10
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists