patch-2.1.28 linux/drivers/sound/pss.c

Next file: linux/drivers/sound/sb.h
Previous file: linux/drivers/sound/pas2_pcm.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.27/linux/drivers/sound/pss.c linux/drivers/sound/pss.c
@@ -4,7 +4,7 @@
  * The low level driver for the Personal Sound System (ECHO ESC614).
  */
 /*
- * Copyright (C) by Hannu Savolainen 1993-1996
+ * Copyright (C) by Hannu Savolainen 1993-1997
  *
  * OSS/Free for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
  * Version 2 (June 1991). See the "COPYING" file distributed with this software
@@ -348,7 +348,7 @@
   /*
      * Disable all emulations. Will be enabled later (if required).
    */
-  outw (0x0000, REG (CONF_PSS));
+  outw (0x0000, REG (CONF_PSS));	/* 0x0400 enables joystick */
   outw (0x0000, REG (CONF_WSS));
   outw (0x0000, REG (CONF_SB));
   outw (0x0000, REG (CONF_MIDI));
@@ -536,7 +536,7 @@
 	if (buf == NULL)
 	  return -ENOSPC;
 
-	copy_from_user ((char *) buf, &((char *) arg)[0], sizeof (*buf));
+	memcpy ((char *) buf, (&((char *) arg)[0]), sizeof (*buf));
 	err = download_boot_block (dev_info, buf);
 	vfree (buf);
 	return err;
@@ -554,7 +554,7 @@
 	if (buf == NULL)
 	  return -ENOSPC;
 
-	copy_from_user ((char *) buf, &((char *) arg)[0], sizeof (*buf));
+	memcpy ((char *) buf, (&((char *) arg)[0]), sizeof (*buf));
 
 	data = (unsigned short *) (buf->data);
 
@@ -567,11 +567,7 @@
 	      {
 		restore_flags (flags);
 		buf->len = i;	/* feed back number of WORDs sent */
-		{
-		  char           *fixit = (char *) buf;
-
-		  copy_to_user (&((char *) arg)[0], fixit, sizeof (*buf));
-		};
+		memcpy ((&((char *) arg)[0]), (char *) buf, sizeof (*buf));
 		vfree (buf);
 		return -EIO;
 	      }
@@ -616,11 +612,7 @@
 
 	restore_flags (flags);
 
-	{
-	  char           *fixit = (char *) buf;
-
-	  copy_to_user (&((char *) arg)[0], fixit, sizeof (*buf));
-	};
+	memcpy ((&((char *) arg)[0]), (char *) buf, sizeof (*buf));
 	vfree (buf);
 
 	return err;
@@ -634,7 +626,7 @@
 	unsigned long   flags;
 	unsigned short  tmp;
 
-	copy_from_user ((char *) &buf, &((char *) arg)[0], sizeof (buf));
+	memcpy ((char *) &buf, (&((char *) arg)[0]), sizeof (buf));
 
 	save_flags (flags);
 	cli ();
@@ -659,11 +651,7 @@
 	buf.parm1 = tmp;
 	restore_flags (flags);
 
-	{
-	  char           *fixit = (char *) &buf;
-
-	  copy_to_user (&((char *) arg)[0], fixit, sizeof (buf));
-	};
+	memcpy ((&((char *) arg)[0]), (char *) &buf, sizeof (buf));
 	return 0;
       }
       break;
@@ -674,7 +662,7 @@
 	unsigned long   flags;
 	unsigned short  tmp;
 
-	copy_from_user ((char *) &buf, &((char *) arg)[0], sizeof (buf));
+	memcpy ((char *) &buf, (&((char *) arg)[0]), sizeof (buf));
 
 	save_flags (flags);
 	cli ();
@@ -708,7 +696,7 @@
 	unsigned long   flags;
 	unsigned short  tmp;
 
-	copy_from_user ((char *) &buf, &((char *) arg)[0], sizeof (buf));
+	memcpy ((char *) &buf, (&((char *) arg)[0]), sizeof (buf));
 
 	save_flags (flags);
 	cli ();
@@ -749,7 +737,7 @@
 	unsigned long   flags;
 	unsigned short  tmp;
 
-	copy_from_user ((char *) &buf, &((char *) arg)[0], sizeof (buf));
+	memcpy ((char *) &buf, (&((char *) arg)[0]), sizeof (buf));
 
 	save_flags (flags);
 	cli ();
@@ -783,11 +771,7 @@
 
 	restore_flags (flags);
 
-	{
-	  char           *fixit = (char *) &buf;
-
-	  copy_to_user (&((char *) arg)[0], fixit, sizeof (buf));
-	};
+	memcpy ((&((char *) arg)[0]), (char *) &buf, sizeof (buf));
 	return 0;
       }
       break;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov