Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 25054
b: refs/heads/master
c: 33d3f07
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar authored and Dmitry Torokhov committed Feb 19, 2006
1 parent 01930ea commit b6b72fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 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: c14471dc2e014f9508ea1ac48394e5437ee970d7
refs/heads/master: 33d3f07ae17c0060dc01f26180c94cf0a39efdf1
9 changes: 5 additions & 4 deletions trunk/drivers/input/keyboard/atkbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <linux/serio.h>
#include <linux/workqueue.h>
#include <linux/libps2.h>
#include <linux/mutex.h>

#define DRIVER_DESC "AT and PS/2 keyboard driver"

Expand Down Expand Up @@ -216,7 +217,7 @@ struct atkbd {
unsigned long time;

struct work_struct event_work;
struct semaphore event_sem;
struct mutex event_mutex;
unsigned long event_mask;
};

Expand Down Expand Up @@ -449,7 +450,7 @@ static void atkbd_event_work(void *data)
unsigned char param[2];
int i, j;

down(&atkbd->event_sem);
mutex_lock(&atkbd->event_mutex);

if (test_and_clear_bit(ATKBD_LED_EVENT_BIT, &atkbd->event_mask)) {
param[0] = (test_bit(LED_SCROLLL, dev->led) ? 1 : 0)
Expand Down Expand Up @@ -480,7 +481,7 @@ static void atkbd_event_work(void *data)
ps2_command(&atkbd->ps2dev, param, ATKBD_CMD_SETREP);
}

up(&atkbd->event_sem);
mutex_unlock(&atkbd->event_mutex);
}

/*
Expand Down Expand Up @@ -846,7 +847,7 @@ static int atkbd_connect(struct serio *serio, struct serio_driver *drv)
atkbd->dev = dev;
ps2_init(&atkbd->ps2dev, serio);
INIT_WORK(&atkbd->event_work, atkbd_event_work, atkbd);
init_MUTEX(&atkbd->event_sem);
mutex_init(&atkbd->event_mutex);

switch (serio->id.type) {

Expand Down

0 comments on commit b6b72fd

Please sign in to comment.