* [PATCH -next] staging: nvec: don't call input_free_device() after input_unregister_device()
@ 2013-04-24 2:47 Wei Yongjun
[not found] ` <CAPgLHd_XHbS=RBxTJWgoJNm0MfQyzyx4Fr2OHrDCN9VKwOwakA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Wei Yongjun @ 2013-04-24 2:47 UTC (permalink / raw)
To: jak-4HMq4SXA452hPH1hqNUYSQ, marvin24-Mmb7MZpHnFY,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r
Cc: yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY,
ac100-oU9gvf+ajcQ97yFScArB1dHuzzzSOjJt,
linux-tegra-u79uwXL29TY76Z2rM5mHXA,
devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b
From: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
input_free_device() should only be used if input_register_device()
was not called yet or if it failed. Once device was unregistered
use input_unregister_device() and memory will be freed once last
reference to the device is dropped.
Signed-off-by: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
---
drivers/staging/nvec/nvec_kbd.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/nvec/nvec_kbd.c b/drivers/staging/nvec/nvec_kbd.c
index 7445ce6..bdf5a64 100644
--- a/drivers/staging/nvec/nvec_kbd.c
+++ b/drivers/staging/nvec/nvec_kbd.c
@@ -170,7 +170,6 @@ fail:
static int nvec_kbd_remove(struct platform_device *pdev)
{
input_unregister_device(keys_dev.input);
- input_free_device(keys_dev.input);
return 0;
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH -next] staging: nvec: don't call input_free_device() after input_unregister_device()
[not found] ` <CAPgLHd_XHbS=RBxTJWgoJNm0MfQyzyx4Fr2OHrDCN9VKwOwakA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2013-05-02 20:18 ` Leon Romanovsky
[not found] ` <CALq1K=JiNqAH19H8C9EMFBjQOLJxSX7wwE28sxWRusk9a12YDQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Leon Romanovsky @ 2013-05-02 20:18 UTC (permalink / raw)
To: Wei Yongjun
Cc: jak-4HMq4SXA452hPH1hqNUYSQ, Marc Dietrich,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY, ac100,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b
On Wed, Apr 24, 2013 at 5:47 AM, Wei Yongjun <weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> From: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
>
> input_free_device() should only be used if input_register_device()
> was not called yet or if it failed. Once device was unregistered
> use input_unregister_device() and memory will be freed once last
> reference to the device is dropped.
>
> Signed-off-by: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
> ---
> drivers/staging/nvec/nvec_kbd.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/staging/nvec/nvec_kbd.c b/drivers/staging/nvec/nvec_kbd.c
> index 7445ce6..bdf5a64 100644
> --- a/drivers/staging/nvec/nvec_kbd.c
> +++ b/drivers/staging/nvec/nvec_kbd.c
> @@ -170,7 +170,6 @@ fail:
> static int nvec_kbd_remove(struct platform_device *pdev)
> {
> input_unregister_device(keys_dev.input);
> - input_free_device(keys_dev.input);
>
> return 0;
> }
>
Hi Greg and Wei,
I sent patch which converts nvec-kbd to managed device (devm_*), so
this patch is not needed.
Thanks.
--
Leon Romanovsky | Independent Linux Consultant
www.leon.nu | leon-2ukJVAZIZ/Y@public.gmane.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH -next] staging: nvec: don't call input_free_device() after input_unregister_device()
[not found] ` <CALq1K=JiNqAH19H8C9EMFBjQOLJxSX7wwE28sxWRusk9a12YDQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2013-05-03 7:56 ` Marc Dietrich
[not found] ` <1490353.qtoJzv77Qb-D3pzGp0ZKuDWZbiwp4sFPyrtisivX6KghOMvlBiLbJSELgA04lAiVw@public.gmane.org>
2013-05-13 21:44 ` Greg KH
1 sibling, 1 reply; 5+ messages in thread
From: Marc Dietrich @ 2013-05-03 7:56 UTC (permalink / raw)
To: Leon Romanovsky
Cc: Wei Yongjun, jak-4HMq4SXA452hPH1hqNUYSQ,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY, ac100,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b
Hi Leon,
Am Donnerstag, 2. Mai 2013, 23:18:35 schrieb Leon Romanovsky:
> On Wed, Apr 24, 2013 at 5:47 AM, Wei Yongjun <weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > From: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
> >
> > input_free_device() should only be used if input_register_device()
> > was not called yet or if it failed. Once device was unregistered
> > use input_unregister_device() and memory will be freed once last
> > reference to the device is dropped.
> >
> > Signed-off-by: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
> > ---
> >
> > drivers/staging/nvec/nvec_kbd.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/staging/nvec/nvec_kbd.c
> > b/drivers/staging/nvedx10c/nvec_kbd.c index 7445ce6..bdf5a64 100644
> > --- a/drivers/staging/nvec/nvec_kbd.c
> > +++ b/drivers/staging/nvec/nvec_kbd.c
> >
> > @@ -170,7 +170,6 @@ fail:
> > static int nvec_kbd_remove(struct platform_device *pdev)
> > {
> >
> > input_unregister_device(keys_dev.input);
> >
> > - input_free_device(keys_dev.input);
> >
> > return 0;
> >
> > }
>
> Hi Greg and Wei,
> I sent patch which converts nvec-kbd to managed device (devm_*), so
> this patch is not needed.
we should not confuse things again. I think Greg can merge the various patches
(from Wei, me, and yours) in a first-come-first-serve order as he always does
and resolve the (trivial) merge conflicts himself. I guess he won't respond
until -rc1 is out. Beside this, I'm not sure if your patch can still go into
3.10 so it may have to wait till 3.11.
Marc
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH -next] staging: nvec: don't call input_free_device() after input_unregister_device()
[not found] ` <1490353.qtoJzv77Qb-D3pzGp0ZKuDWZbiwp4sFPyrtisivX6KghOMvlBiLbJSELgA04lAiVw@public.gmane.org>
@ 2013-05-03 14:07 ` Leon Romanovsky
0 siblings, 0 replies; 5+ messages in thread
From: Leon Romanovsky @ 2013-05-03 14:07 UTC (permalink / raw)
To: Marc Dietrich
Cc: Wei Yongjun, jak, gregkh, yongjun_wei, ac100,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b
On Fri, May 3, 2013 at 10:56 AM, Marc Dietrich <marvin24-Mmb7MZpHnFY@public.gmane.org> wrote:
> Hi Leon,
>
> Am Donnerstag, 2. Mai 2013, 23:18:35 schrieb Leon Romanovsky:
>> On Wed, Apr 24, 2013 at 5:47 AM, Wei Yongjun <weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> > From: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
>> >
>> > input_free_device() should only be used if input_register_device()
>> > was not called yet or if it failed. Once device was unregistered
>> > use input_unregister_device() and memory will be freed once last
>> > reference to the device is dropped.
>> >
>> > Signed-off-by: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
>> > ---
>> >
>> > drivers/staging/nvec/nvec_kbd.c | 1 -
>> > 1 file changed, 1 deletion(-)
>> >
>> > diff --git a/drivers/staging/nvec/nvec_kbd.c
>> > b/drivers/staging/nvedx10c/nvec_kbd.c index 7445ce6..bdf5a64 100644
>> > --- a/drivers/staging/nvec/nvec_kbd.c
>> > +++ b/drivers/staging/nvec/nvec_kbd.c
>> >
>> > @@ -170,7 +170,6 @@ fail:
>> > static int nvec_kbd_remove(struct platform_device *pdev)
>> > {
>> >
>> > input_unregister_device(keys_dev.input);
>> >
>> > - input_free_device(keys_dev.input);
>> >
>> > return 0;
>> >
>> > }
>>
>> Hi Greg and Wei,
>> I sent patch which converts nvec-kbd to managed device (devm_*), so
>> this patch is not needed.
>
> we should not confuse things again. I think Greg can merge the various patches
> (from Wei, me, and yours) in a first-come-first-serve order as he always does
> and resolve the (trivial) merge conflicts himself. I guess he won't respond
> until -rc1 is out. Beside this, I'm not sure if your patch can still go into
> 3.10 so it may have to wait till 3.11.
There is no hurry to apply my patch, and I believe it will apply
without merge conflict at all. My patch removes line with
input_free_device also.
--
Leon Romanovsky | Independent Linux Consultant
www.leon.nu | leon-2ukJVAZIZ/Y@public.gmane.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH -next] staging: nvec: don't call input_free_device() after input_unregister_device()
[not found] ` <CALq1K=JiNqAH19H8C9EMFBjQOLJxSX7wwE28sxWRusk9a12YDQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-05-03 7:56 ` Marc Dietrich
@ 2013-05-13 21:44 ` Greg KH
1 sibling, 0 replies; 5+ messages in thread
From: Greg KH @ 2013-05-13 21:44 UTC (permalink / raw)
To: Leon Romanovsky
Cc: Wei Yongjun, jak-4HMq4SXA452hPH1hqNUYSQ, Marc Dietrich,
yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY, ac100,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b
On Thu, May 02, 2013 at 11:18:35PM +0300, Leon Romanovsky wrote:
> On Wed, Apr 24, 2013 at 5:47 AM, Wei Yongjun <weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > From: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
> >
> > input_free_device() should only be used if input_register_device()
> > was not called yet or if it failed. Once device was unregistered
> > use input_unregister_device() and memory will be freed once last
> > reference to the device is dropped.
> >
> > Signed-off-by: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
> > ---
> > drivers/staging/nvec/nvec_kbd.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/staging/nvec/nvec_kbd.c b/drivers/staging/nvec/nvec_kbd.c
> > index 7445ce6..bdf5a64 100644
> > --- a/drivers/staging/nvec/nvec_kbd.c
> > +++ b/drivers/staging/nvec/nvec_kbd.c
> > @@ -170,7 +170,6 @@ fail:
> > static int nvec_kbd_remove(struct platform_device *pdev)
> > {
> > input_unregister_device(keys_dev.input);
> > - input_free_device(keys_dev.input);
> >
> > return 0;
> > }
> >
>
> Hi Greg and Wei,
> I sent patch which converts nvec-kbd to managed device (devm_*), so
> this patch is not needed.
I agree, yours is the correct fix for this, I'll take your patch
instead.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-05-13 21:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-24 2:47 [PATCH -next] staging: nvec: don't call input_free_device() after input_unregister_device() Wei Yongjun
[not found] ` <CAPgLHd_XHbS=RBxTJWgoJNm0MfQyzyx4Fr2OHrDCN9VKwOwakA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-05-02 20:18 ` Leon Romanovsky
[not found] ` <CALq1K=JiNqAH19H8C9EMFBjQOLJxSX7wwE28sxWRusk9a12YDQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-05-03 7:56 ` Marc Dietrich
[not found] ` <1490353.qtoJzv77Qb-D3pzGp0ZKuDWZbiwp4sFPyrtisivX6KghOMvlBiLbJSELgA04lAiVw@public.gmane.org>
2013-05-03 14:07 ` Leon Romanovsky
2013-05-13 21:44 ` Greg KH
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).