linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] RFKILL: fix input layer initialisation
@ 2008-10-22 16:52 Dmitry Baryshkov
  2008-10-22 17:05 ` Ivo van Doorn
  2008-10-22 17:15 ` Henrique de Moraes Holschuh
  0 siblings, 2 replies; 4+ messages in thread
From: Dmitry Baryshkov @ 2008-10-22 16:52 UTC (permalink / raw)
  To: linux-wireless; +Cc: linux-input, Dmitry Baryshkov

Initialise correctly last fields, so tasks can be actually executed.
On some architectures the initial jiffies value is not zero, so later
all rfkill incorrectly decides that rfkill_*.last is in future.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
---
 net/rfkill/rfkill-input.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/net/rfkill/rfkill-input.c b/net/rfkill/rfkill-input.c
index e5b6955..cd93f48 100644
--- a/net/rfkill/rfkill-input.c
+++ b/net/rfkill/rfkill-input.c
@@ -255,6 +255,11 @@ static struct input_handler rfkill_handler = {
 
 static int __init rfkill_handler_init(void)
 {
+	unsigned long last_run = jiffies - msecs_to_jiffies(500);
+	rfkill_wlan.last = last_run;
+	rfkill_bt.last = last_run;
+	rfkill_uwb.last = last_run;
+	rfkill_wimax.last = last_run;
 	return input_register_handler(&rfkill_handler);
 }
 
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] RFKILL: fix input layer initialisation
  2008-10-22 16:52 [PATCH] RFKILL: fix input layer initialisation Dmitry Baryshkov
@ 2008-10-22 17:05 ` Ivo van Doorn
       [not found]   ` <200810221905.58169.IvDoorn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2008-10-22 17:15 ` Henrique de Moraes Holschuh
  1 sibling, 1 reply; 4+ messages in thread
From: Ivo van Doorn @ 2008-10-22 17:05 UTC (permalink / raw)
  To: Dmitry Baryshkov; +Cc: linux-wireless, linux-input

On Wednesday 22 October 2008, Dmitry Baryshkov wrote:
> Initialise correctly last fields, so tasks can be actually executed.
> On some architectures the initial jiffies value is not zero, so later
> all rfkill incorrectly decides that rfkill_*.last is in future.
> 
> Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
> ---
>  net/rfkill/rfkill-input.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/net/rfkill/rfkill-input.c b/net/rfkill/rfkill-input.c
> index e5b6955..cd93f48 100644
> --- a/net/rfkill/rfkill-input.c
> +++ b/net/rfkill/rfkill-input.c
> @@ -255,6 +255,11 @@ static struct input_handler rfkill_handler = {
>  
>  static int __init rfkill_handler_init(void)
>  {
> +	unsigned long last_run = jiffies - msecs_to_jiffies(500);
> +	rfkill_wlan.last = last_run;
> +	rfkill_bt.last = last_run;
> +	rfkill_uwb.last = last_run;
> +	rfkill_wimax.last = last_run;
>  	return input_register_handler(&rfkill_handler);
>  }

I believe Dmitry Torokhov recently moved the rfkill structures for wlan, bt, etc
into an array which allowed for easy looping through all structures. That would
make updating all entries easier (and less prone to errors when a new structure
is added).

Could you rebase thise patch on top of that one?
Thanks,

Ivo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] RFKILL: fix input layer initialisation
  2008-10-22 16:52 [PATCH] RFKILL: fix input layer initialisation Dmitry Baryshkov
  2008-10-22 17:05 ` Ivo van Doorn
@ 2008-10-22 17:15 ` Henrique de Moraes Holschuh
  1 sibling, 0 replies; 4+ messages in thread
From: Henrique de Moraes Holschuh @ 2008-10-22 17:15 UTC (permalink / raw)
  To: Dmitry Baryshkov; +Cc: linux-wireless, linux-input

On Wed, 22 Oct 2008, Dmitry Baryshkov wrote:
> Initialise correctly last fields, so tasks can be actually executed.
> On some architectures the initial jiffies value is not zero, so later
> all rfkill incorrectly decides that rfkill_*.last is in future.
> 
> Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
> ---
>  net/rfkill/rfkill-input.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/net/rfkill/rfkill-input.c b/net/rfkill/rfkill-input.c
> index e5b6955..cd93f48 100644
> --- a/net/rfkill/rfkill-input.c
> +++ b/net/rfkill/rfkill-input.c
> @@ -255,6 +255,11 @@ static struct input_handler rfkill_handler = {
>  
>  static int __init rfkill_handler_init(void)
>  {
> +	unsigned long last_run = jiffies - msecs_to_jiffies(500);
> +	rfkill_wlan.last = last_run;
> +	rfkill_bt.last = last_run;
> +	rfkill_uwb.last = last_run;
> +	rfkill_wimax.last = last_run;
>  	return input_register_handler(&rfkill_handler);
>  }

This is not needed for wireless-testing's rfkill-input.

It is needed on 2.6.28, since AFAIK the stuff in wireless-testing is not
going to be sent for 2.6.28.

A similar patch to this was sent not a month ago, I think.  One of the two
needs to be merged for 2.6.28.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] RFKILL: fix input layer initialisation
       [not found]   ` <200810221905.58169.IvDoorn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2008-10-28 12:33     ` Dmitry
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry @ 2008-10-28 12:33 UTC (permalink / raw)
  To: Ivo van Doorn
  Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	linux-input-u79uwXL29TY76Z2rM5mHXA

2008/10/22 Ivo van Doorn <ivdoorn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
> On Wednesday 22 October 2008, Dmitry Baryshkov wrote:
>> Initialise correctly last fields, so tasks can be actually executed.
>> On some architectures the initial jiffies value is not zero, so later
>> all rfkill incorrectly decides that rfkill_*.last is in future.
>>
>> Signed-off-by: Dmitry Baryshkov <dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> ---
>>  net/rfkill/rfkill-input.c |    5 +++++
>>  1 files changed, 5 insertions(+), 0 deletions(-)
>>
>> diff --git a/net/rfkill/rfkill-input.c b/net/rfkill/rfkill-input.c
>> index e5b6955..cd93f48 100644
>> --- a/net/rfkill/rfkill-input.c
>> +++ b/net/rfkill/rfkill-input.c
>> @@ -255,6 +255,11 @@ static struct input_handler rfkill_handler = {
>>
>>  static int __init rfkill_handler_init(void)
>>  {
>> +     unsigned long last_run = jiffies - msecs_to_jiffies(500);
>> +     rfkill_wlan.last = last_run;
>> +     rfkill_bt.last = last_run;
>> +     rfkill_uwb.last = last_run;
>> +     rfkill_wimax.last = last_run;
>>       return input_register_handler(&rfkill_handler);
>>  }
>
> I believe Dmitry Torokhov recently moved the rfkill structures for wlan, bt, etc
> into an array which allowed for easy looping through all structures. That would
> make updating all entries easier (and less prone to errors when a new structure
> is added).

I can't find the patch in question. Could you please point me to it?

>
> Could you rebase thise patch on top of that one?
> Thanks,

-- 
With best wishes
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-10-28 12:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-22 16:52 [PATCH] RFKILL: fix input layer initialisation Dmitry Baryshkov
2008-10-22 17:05 ` Ivo van Doorn
     [not found]   ` <200810221905.58169.IvDoorn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2008-10-28 12:33     ` Dmitry
2008-10-22 17:15 ` Henrique de Moraes Holschuh

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).