linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: serio - do not mark kseriod freezable anymore
@ 2009-12-21  7:33 Dmitry Torokhov
  2009-12-21 20:23 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Torokhov @ 2009-12-21  7:33 UTC (permalink / raw)
  To: Linux Input; +Cc: Rafael J. Wysocki

We used to make kseriod freezable to prevent unnecessary attempts at
resuming keyboard and mouse before taking hibernation image when suspend
and hibernation were sharing PM operations. Now that they are separated
and we don't risk resuming during 'thaw' we don't need to freeze kseriod
anymore. This will allow us to start resetting mouse and keyboard a bit
earlier, before rest of the userspace comes back up.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---

 drivers/input/serio/serio.c |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)


diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c
index 0236f0d..e0f3018 100644
--- a/drivers/input/serio/serio.c
+++ b/drivers/input/serio/serio.c
@@ -284,13 +284,7 @@ static void serio_handle_event(void)
 
 	mutex_lock(&serio_mutex);
 
-	/*
-	 * Note that we handle only one event here to give swsusp
-	 * a chance to freeze kseriod thread. Serio events should
-	 * be pretty rare so we are not concerned about taking
-	 * performance hit.
-	 */
-	if ((event = serio_get_event())) {
+	while ((event = serio_get_event())) {
 
 		switch (event->type) {
 			case SERIO_REGISTER_PORT:
@@ -380,10 +374,9 @@ static struct serio *serio_get_pending_child(struct serio *parent)
 
 static int serio_thread(void *nothing)
 {
-	set_freezable();
 	do {
 		serio_handle_event();
-		wait_event_freezable(serio_wait,
+		wait_event_interruptible(serio_wait,
 			kthread_should_stop() || !list_empty(&serio_event_list));
 	} while (!kthread_should_stop());
 

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

* Re: [PATCH] Input: serio - do not mark kseriod freezable anymore
  2009-12-21  7:33 [PATCH] Input: serio - do not mark kseriod freezable anymore Dmitry Torokhov
@ 2009-12-21 20:23 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2009-12-21 20:23 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Linux Input

On Monday 21 December 2009, Dmitry Torokhov wrote:
> We used to make kseriod freezable to prevent unnecessary attempts at
> resuming keyboard and mouse before taking hibernation image when suspend
> and hibernation were sharing PM operations. Now that they are separated
> and we don't risk resuming during 'thaw' we don't need to freeze kseriod
> anymore. This will allow us to start resetting mouse and keyboard a bit
> earlier, before rest of the userspace comes back up.
> 
> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

Acked-by: Rafael J. Wysocki <rjw@sisk.pl>

> ---
> 
>  drivers/input/serio/serio.c |   11 ++---------
>  1 files changed, 2 insertions(+), 9 deletions(-)
> 
> 
> diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c
> index 0236f0d..e0f3018 100644
> --- a/drivers/input/serio/serio.c
> +++ b/drivers/input/serio/serio.c
> @@ -284,13 +284,7 @@ static void serio_handle_event(void)
>  
>  	mutex_lock(&serio_mutex);
>  
> -	/*
> -	 * Note that we handle only one event here to give swsusp
> -	 * a chance to freeze kseriod thread. Serio events should
> -	 * be pretty rare so we are not concerned about taking
> -	 * performance hit.
> -	 */
> -	if ((event = serio_get_event())) {
> +	while ((event = serio_get_event())) {
>  
>  		switch (event->type) {
>  			case SERIO_REGISTER_PORT:
> @@ -380,10 +374,9 @@ static struct serio *serio_get_pending_child(struct serio *parent)
>  
>  static int serio_thread(void *nothing)
>  {
> -	set_freezable();
>  	do {
>  		serio_handle_event();
> -		wait_event_freezable(serio_wait,
> +		wait_event_interruptible(serio_wait,
>  			kthread_should_stop() || !list_empty(&serio_event_list));
>  	} while (!kthread_should_stop());
>  
> 
> 


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

end of thread, other threads:[~2009-12-21 20:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-21  7:33 [PATCH] Input: serio - do not mark kseriod freezable anymore Dmitry Torokhov
2009-12-21 20:23 ` Rafael J. Wysocki

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