patch-2.3.13 linux/drivers/char/dn_keyb.c
Next file: linux/drivers/char/dsp56k.c
Previous file: linux/drivers/char/cyclades.c
Back to the patch index
Back to the overall index
- Lines: 38
- Date:
Mon Aug 9 12:32:28 1999
- Orig file:
v2.3.12/linux/drivers/char/dn_keyb.c
- Orig date:
Thu Jul 8 15:42:20 1999
diff -u --recursive --new-file v2.3.12/linux/drivers/char/dn_keyb.c linux/drivers/char/dn_keyb.c
@@ -55,7 +55,8 @@
static u_char debug_buf1[4096],debug_buf2[4096],*debug_buf=&debug_buf1[0];
static u_char *shadow_buf=&debug_buf2[0];
static short debug_buf_count=0;
-static int debug_buf_overrun=0,debug_timer_running=0,debug_buffer_updated=0;
+static int debug_buf_overrun=0,debug_timer_running=0;
+static unsigned long debug_buffer_updated=0;
static struct timer_list debug_keyb_timer = { NULL, NULL, 0, 0,
debug_keyb_timer_handler };
#endif
@@ -280,7 +281,7 @@
u_char *swap;
short length,i;
- if((jiffies-debug_buffer_updated) > 100) {
+ if (time_after(jiffies, debug_buffer_updated + 100)) {
save_flags(flags);
cli();
length=debug_buf_count;
@@ -422,7 +423,7 @@
!(prev_scancode==DNKEY_CTRL || prev_scancode==DNKEY_LSHIFT ||
prev_scancode==DNKEY_RSHIFT || prev_scancode==DNKEY_REPT ||
prev_scancode==DNKEY_LALT || prev_scancode==DNKEY_RALT)) {
- if(jiffies-lastkeypress > DNKEY_REPEAT_DELAY) {
+ if (time_after(jiffies, lastkeypress + DNKEY_REPEAT_DELAY)) {
/* printk("handle_scancode: %02x\n",prev_scancode); */
handle_scancode(prev_scancode, 1);
}
@@ -491,8 +492,8 @@
debug_buf[debug_buf_count++]=data;
debug_buffer_updated=jiffies;
if(!debug_timer_running) {
- add_timer(&debug_keyb_timer);
debug_keyb_timer.expires=jiffies+10;
+ add_timer(&debug_keyb_timer);
debug_timer_running=1;
}
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)