* [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
* Re: [PATCH] pinctrl: core: use devres_release() instead of devres_destroy()
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
1 sibling, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2013-03-01 0:54 UTC (permalink / raw)
To: Jingoo Han, Stephen Warren; +Cc: linux-kernel
On Tue, Feb 26, 2013 at 3:34 AM, Jingoo Han <jg1.han@samsung.com> wrote:
> 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>
Hm, Stephen, you OK with this?
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] pinctrl: core: use devres_release() instead of devres_destroy()
2013-03-01 0:54 ` Linus Walleij
@ 2013-03-01 1:11 ` Stephen Warren
0 siblings, 0 replies; 4+ messages in thread
From: Stephen Warren @ 2013-03-01 1:11 UTC (permalink / raw)
To: Linus Walleij; +Cc: Jingoo Han, linux-kernel
On 02/28/2013 05:54 PM, Linus Walleij wrote:
> On Tue, Feb 26, 2013 at 3:34 AM, Jingoo Han <jg1.han@samsung.com> wrote:
>
>> 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>
>
> Hm, Stephen, you OK with this?
Sounds reasonable,
Acked-by: Stephen Warren <swarren@nvidia.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] pinctrl: core: use devres_release() instead of devres_destroy()
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 12:30 ` Linus Walleij
1 sibling, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2013-03-01 12:30 UTC (permalink / raw)
To: Jingoo Han; +Cc: linux-kernel
On Tue, Feb 26, 2013 at 3:34 AM, Jingoo Han <jg1.han@samsung.com> wrote:
> 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>
Patch applied with Stephen's ACK!
Thanks,
Linus Walleij
^ permalink raw reply [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;
as well as URLs for NNTP newsgroup(s).