patch-2.4.20 linux-2.4.20/drivers/sgi/char/streamable.c

Next file: linux-2.4.20/drivers/sgi/char/usema.c
Previous file: linux-2.4.20/drivers/sgi/char/shmiq.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.19/drivers/sgi/char/streamable.c linux-2.4.20/drivers/sgi/char/streamable.c
@@ -36,13 +36,13 @@
 get_sioc (struct strioctl *sioc, unsigned long arg)
 {
 	int v;
-	
+
 	v = verify_area (VERIFY_WRITE, (void *) arg, sizeof (struct strioctl));
 	if (v)
 		return v;
 	if (copy_from_user (sioc, (void *) arg, sizeof (struct strioctl)))
 		return -EFAULT;
-		
+
 	v = verify_area (VERIFY_WRITE, (void *) sioc->ic_dp, sioc->ic_len);
 	if (v)
 		return v;
@@ -61,7 +61,7 @@
 struct file_operations sgi_gfx_fops = {
 	ioctl:		sgi_gfx_ioctl,
 };
- 
+
 static struct miscdevice dev_gfx = {
 	SGI_GFX_MINOR, "sgi-gfx", &sgi_gfx_fops
 };
@@ -83,12 +83,12 @@
 sgi_kbd_sioc (idevInfo *dinfo, int cmd, int size, char *data, int *found)
 {
 	*found = 1;
-	
+
 	switch (cmd){
 
 	case IDEVINITDEVICE:
 		return 0;
-			
+
 	case IDEVGETDEVICEDESC:
 		if (size >= sizeof (idevDesc)){
 			if (copy_to_user (data, &sgi_kbd_desc, sizeof (sgi_kbd_desc)))
@@ -114,7 +114,7 @@
 {
 	struct strioctl sioc;
 	int    f, v;
-	
+
 	/* IRIX calls I_PUSH on the opened device, go figure */
 	if (cmd == I_PUSH)
 		return 0;
@@ -129,16 +129,16 @@
 		 * call a stock IRIX xxx_wioctl routine
 		 *
 		 * The NULL is supposed to be a idevInfo, right now we
-		 * do not support this in our kernel.  
+		 * do not support this in our kernel.
 		 */
 		return sgi_kbd_sioc (NULL, sioc.ic_cmd, sioc.ic_len, sioc.ic_dp, &f);
 	}
-	
+
 	if (cmd == SHMIQ_ON){
 		kbd_assigned_device = arg;
 		forward_chars = fg_console + 1;
 		kbd_prev_mode = kbd_table [fg_console].kbdmode;
-		
+
 	        kbd_table [fg_console].kbdmode = VC_RAW;
 	} else if (cmd == SHMIQ_OFF && forward_chars){
 		kbd_table [forward_chars-1].kbdmode = kbd_prev_mode;
@@ -203,15 +203,15 @@
 
 static int mouse_opened;
 static idevValuatorDesc mouse_valuators [MOUSE_VALUATORS];
-	
+
 int
 sgi_mouse_open (struct inode *inode, struct file *file)
 {
 	int i;
-	
+
 	if (mouse_opened)
 		return -EBUSY;
-	
+
 	mouse_opened = 1;
 	for (i = 0; i < MOUSE_VALUATORS; i++)
 		mouse_valuators [i] = mouse_default_valuator;
@@ -235,7 +235,7 @@
 	switch (cmd){
 	case IDEVINITDEVICE:
 		return 0;
-			
+
 	case IDEVGETDEVICEDESC:
 		if (size >= sizeof (idevDesc)){
 			if (copy_to_user (data, &sgi_mouse_desc, sizeof (sgi_mouse_desc)))
@@ -246,7 +246,7 @@
 
 	case IDEVGETVALUATORDESC: {
 		idevGetSetValDesc request, *ureq = (idevGetSetValDesc *) data;
-		
+
 		if (size < sizeof (idevGetSetValDesc))
 			return -EINVAL;
 
@@ -254,7 +254,7 @@
 			return -EFAULT;
 		if (request.valNum >= MOUSE_VALUATORS)
 			return -EINVAL;
-		if (copy_to_user ((void *)&ureq->desc, 
+		if (copy_to_user ((void *)&ureq->desc,
 				  (void *)&mouse_valuators [request.valNum],
 				  sizeof (idevValuatorDesc)))
 			return -EFAULT;
@@ -280,16 +280,16 @@
 		v = get_sioc (&sioc, arg);
 		if (v)
 			return v;
-		
+
 		/* Why like this?  Because this is a sample piece of code
 		 * that can be copied into other drivers and shows how to
 		 * call a stock IRIX xxx_wioctl routine
 		 *
 		 * The NULL is supposed to be a idevInfo, right now we
-		 * do not support this in our kernel.  
+		 * do not support this in our kernel.
 		 */
 		return sgi_mouse_sioc (NULL, sioc.ic_cmd, sioc.ic_len, sioc.ic_dp, &f);
-		
+
 	case SHMIQ_ON:
 	case SHMIQ_OFF:
 		return 0;
@@ -313,7 +313,7 @@
 {
 	printk ("streamable misc devices registered (keyb:%d, gfx:%d)\n",
 		SGI_STREAMS_KEYBOARD, SGI_GFX_MINOR);
-	
+
 	misc_register (&dev_gfx);
 	misc_register (&dev_input_keyboard);
 	misc_register (&dev_input_mouse);

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