patch-2.4.0-test2 linux/drivers/char/dn_keyb.c

Next file: linux/drivers/char/drm/Makefile
Previous file: linux/drivers/char/cyclades.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test1/linux/drivers/char/dn_keyb.c linux/drivers/char/dn_keyb.c
@@ -357,17 +357,14 @@
 				mouse_dy+=mouse_packet[2] == 0xff ? 0 : (signed char)mouse_packet[2];
 				wake_up_interruptible(&mouse_wait);
 				if (mouse_dx < -2048)
-              		mouse_dx = -2048;
-          		else
-          		if (mouse_dx >  2048)
-              		mouse_dx =  2048;
-          		if (mouse_dy < -2048)
-              		mouse_dy = -2048;
-          		else
-          		if (mouse_dy >  2048)
-              		mouse_dy =  2048;
-				if (mouse_fasyncptr)
-              		kill_fasync(mouse_fasyncptr, SIGIO, POLL_IN);
+              				mouse_dx = -2048;
+          			else if (mouse_dx >  2048)
+              				mouse_dx =  2048;
+         	 		if (mouse_dy < -2048)
+              				mouse_dy = -2048;
+          			else if (mouse_dy >  2048)
+             			 	mouse_dy =  2048;
+              			kill_fasync(&mouse_fasyncptr, SIGIO, POLL_IN);
 			}
 			mouse_byte_count=0;
 /*			printk("mouse: %d, %d, %x\n",mouse_x,mouse_y,buttons); */
@@ -450,20 +447,8 @@
 
 }
 
-static int release_mouse(struct inode * inode, struct file * file)
-{
-        MOD_DEC_USE_COUNT;
-        return 0;
-}
-
-static int open_mouse(struct inode * inode, struct file * file)
-{
-        MOD_INC_USE_COUNT;
-        return 0;
-}
-
 static struct busmouse apollo_mouse = {
-        APOLLO_MOUSE_MINOR, "apollomouse", open_mouse, release_mouse,7
+        APOLLO_MOUSE_MINOR, "apollomouse", THIS_MODULE, NULL, NULL, 7
 };
 
 int __init dn_keyb_init(void){

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)