From: Jingoo Han Date: Tue, 26 Feb 2013 02:34:07 +0000 (+0900) Subject: pinctrl: core: use devres_release() instead of devres_destroy() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a72149e82b65b76d2dae5428a6b211eb43933529;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Acked-by: Stephen Warren Signed-off-by: Linus Walleij --- 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) */ 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);