mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-08 07:38:10 +00:00
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>
This commit is contained in:
parent
6dbe51c251
commit
a72149e82b
1 changed files with 1 additions and 2 deletions
|
@ -979,9 +979,8 @@ static int devm_pinctrl_match(struct device *dev, void *res, void *data)
|
||||||
*/
|
*/
|
||||||
void devm_pinctrl_put(struct pinctrl *p)
|
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));
|
devm_pinctrl_match, p));
|
||||||
pinctrl_put(p);
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(devm_pinctrl_put);
|
EXPORT_SYMBOL_GPL(devm_pinctrl_put);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue