pinctrl: core: use devres_release() instead of devres_destroy()
PATCH 1/1 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.
--- drivers/pinctrl/core.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/pinctrl/core.c +1 -2
@@ -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);
Signature · 1 line
1.7.2.5
Quoted 5 lines · Jingoo Han
devres_release()can simplify the code, becausedevres_release()will call the destructor for the resource as well as freeing the devres data.Signed-off-by Jingoo Han <[email protected]>
Hm, Stephen, you OK with this?
Yours,
Linus Walleij
Stephen Warren
Acked-byQuoted 9 lines · Linus Walleij
Quoted 5 lines · Jingoo Han
devres_release()can simplify the code, becausedevres_release()will call the destructor for the resource as well as freeing the devres data.Signed-off-by Jingoo Han <[email protected]>Hm, Stephen, you OK with this?
Sounds reasonable,
Quoted 5 lines · Jingoo Han
devres_release()can simplify the code, becausedevres_release()will call the destructor for the resource as well as freeing the devres data.Signed-off-by Jingoo Han <[email protected]>
Patch applied with Stephen's ACK!
Thanks,
Linus Walleij