aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/core.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-02-25 21:34:07 -0500
committerLinus Walleij <linus.walleij@linaro.org>2013-03-06 23:27:29 -0500
commita72149e82b65b76d2dae5428a6b211eb43933529 (patch)
tree81a5401294d90b2810bd8954bf21fbb5c57e9830 /drivers/pinctrl/core.c
parent6dbe51c251a327e012439c4772097a13df43c5b8 (diff)
pinctrl: core: use devres_release() instead of devres_destroy()
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> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/core.c')
-rw-r--r--drivers/pinctrl/core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index b0de6e7f1fdb..e2d214c5c58f 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)
979 */ 979 */
980void devm_pinctrl_put(struct pinctrl *p) 980void devm_pinctrl_put(struct pinctrl *p)
981{ 981{
982 WARN_ON(devres_destroy(p->dev, devm_pinctrl_release, 982 WARN_ON(devres_release(p->dev, devm_pinctrl_release,
983 devm_pinctrl_match, p)); 983 devm_pinctrl_match, p));
984 pinctrl_put(p);
985} 984}
986EXPORT_SYMBOL_GPL(devm_pinctrl_put); 985EXPORT_SYMBOL_GPL(devm_pinctrl_put);
987 986