public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pinctrl: core: use devres_release() instead of devres_destroy()
@ 2013-02-26  2:34 Jingoo Han
  2013-03-01  0:54 ` Linus Walleij
  2013-03-01 12:30 ` Linus Walleij
  0 siblings, 2 replies; 4+ messages in thread
From: Jingoo Han @ 2013-02-26  2:34 UTC (permalink / raw)
  To: 'Linus Walleij'; +Cc: linux-kernel, 'Jingoo Han'

devres_release() can simplify the code, because devres_release()
will call the destructor for the resource as well as freeing
the devres data.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/pinctrl/core.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index b0de6e7..e2d214c 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -979,9 +979,8 @@ static int devm_pinctrl_match(struct device *dev, void *res, void *data)
  */
 void devm_pinctrl_put(struct pinctrl *p)
 {
-	WARN_ON(devres_destroy(p->dev, devm_pinctrl_release,
+	WARN_ON(devres_release(p->dev, devm_pinctrl_release,
 			       devm_pinctrl_match, p));
-	pinctrl_put(p);
 }
 EXPORT_SYMBOL_GPL(devm_pinctrl_put);
 
-- 
1.7.2.5



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-03-01 12:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-26  2:34 [PATCH] pinctrl: core: use devres_release() instead of devres_destroy() Jingoo Han
2013-03-01  0:54 ` Linus Walleij
2013-03-01  1:11   ` Stephen Warren
2013-03-01 12:30 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox