Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 14536
b: refs/heads/master
c: 9e50afd
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Torokhov committed Nov 20, 2005
1 parent ab4f187 commit d7c2eda
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bd0ef2356cd85d39387be36fdf1f83a40075057f
refs/heads/master: 9e50afd0cb3ff9ee152dbcf8601f5fb7eba5cff8
12 changes: 9 additions & 3 deletions trunk/drivers/input/gameport/gameport.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,14 +339,20 @@ static struct gameport_event *gameport_get_event(void)
return event;
}

static void gameport_handle_events(void)
static void gameport_handle_event(void)
{
struct gameport_event *event;
struct gameport_driver *gameport_drv;

down(&gameport_sem);

while ((event = gameport_get_event())) {
/*
* Note that we handle only one event here to give swsusp
* a chance to freeze kgameportd thread. Gameport events
* should be pretty rare so we are not concerned about
* taking performance hit.
*/
if ((event = gameport_get_event())) {

switch (event->type) {
case GAMEPORT_REGISTER_PORT:
Expand Down Expand Up @@ -433,7 +439,7 @@ static struct gameport *gameport_get_pending_child(struct gameport *parent)
static int gameport_thread(void *nothing)
{
do {
gameport_handle_events();
gameport_handle_event();
wait_event_interruptible(gameport_wait,
kthread_should_stop() || !list_empty(&gameport_event_list));
try_to_freeze();
Expand Down
12 changes: 9 additions & 3 deletions trunk/drivers/input/serio/serio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit d7c2eda

Please sign in to comment.