diff options
author | Dave Jones <davej@redhat.com> | 2005-11-21 06:56:52 -0800 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2005-11-21 06:56:52 -0800 |
commit | e7e37ee9c547213d726b29c2510cbb6696050405 (patch) | |
tree | 50c45625de666b23f209d79eb1bfae05c64feee9 /drivers/input/serio/serio.c | |
parent | c243f1f1f6545985afcc6adf1fc085729029c3ee (diff) | |
parent | db93a82fa9d8b4d6e31c227922eaae829253bb88 (diff) |
Merge ../linus/
Diffstat (limited to 'drivers/input/serio/serio.c')
-rw-r--r-- | drivers/input/serio/serio.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c index edd15db1771..fbb69ef6a77 100644 --- a/drivers/input/serio/serio.c +++ b/drivers/input/serio/serio.c @@ -269,14 +269,20 @@ static struct serio_event *serio_get_event(void) return event; } -static void serio_handle_events(void) +static void serio_handle_event(void) { struct serio_event *event; struct serio_driver *serio_drv; down(&serio_sem); - while ((event = serio_get_event())) { + /* + * 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())) { switch (event->type) { case SERIO_REGISTER_PORT: @@ -368,7 +374,7 @@ static struct serio *serio_get_pending_child(struct serio *parent) static int serio_thread(void *nothing) { do { - serio_handle_events(); + serio_handle_event(); wait_event_interruptible(serio_wait, kthread_should_stop() || !list_empty(&serio_event_list)); try_to_freeze(); |