From: <patrice.chotard.st@gmail.com>
To: <linux-kernel@vger.kernel.org>, <linus.walleij@linaro.org>
Cc: Lee Jones <lee.jones@linaro.org>, <fabio.baltieri@linaro.org>,
Patrice Chotard <patrice.chotard@st.com>
Subject: [PATCH] pinctrl: abx500: suppress unused mutex
Date: Thu, 23 May 2013 17:31:42 +0200 [thread overview]
Message-ID: <1369323102-3030-1-git-send-email-patrice.chotard.st@gmail.com> (raw)
From: Patrice Chotard <patrice.chotard@st.com>
Suppress a mutex which was initialized on probe
and destroyed on remove but never used.
Signed-off-by: Patrice Chotard <patrice.chotard@st.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
next reply other threads:[~2013-05-23 15:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-23 15:31 patrice.chotard.st [this message]
2013-05-24 8:45 ` Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1369323102-3030-1-git-send-email-patrice.chotard.st@gmail.com \
--to=patrice.chotard.st@gmail.com \
--cc=fabio.baltieri@linaro.org \
--cc=lee.jones@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patrice.chotard@st.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®