patch-2.1.4 linux/drivers/sound/mpu401.c

Next file: linux/drivers/sound/opl3.c
Previous file: linux/drivers/sound/midibuf.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.3/linux/drivers/sound/mpu401.c linux/drivers/sound/mpu401.c
@@ -780,7 +780,7 @@
   switch (cmd)
     {
     case 1:
-      memcpy_fromfs ((char *) init_sequence, &((char *) arg)[0], sizeof (init_sequence));
+      copy_from_user ((char *) init_sequence, &((char *) arg)[0], sizeof (init_sequence));
       return 0;
       break;
 
@@ -799,12 +799,12 @@
 	int             ret;
 	mpu_command_rec rec;
 
-	memcpy_fromfs ((char *) &rec, &((char *) arg)[0], sizeof (rec));
+	copy_from_user ((char *) &rec, &((char *) arg)[0], sizeof (rec));
 
 	if ((ret = mpu401_command (dev, &rec)) < 0)
 	  return ret;
 
-	memcpy_tofs (&((char *) arg)[0], (char *) &rec, sizeof (rec));
+	copy_to_user (&((char *) arg)[0], (char *) &rec, sizeof (rec));
 	return 0;
       }
       break;
@@ -845,7 +845,7 @@
     {
 
     case SNDCTL_SYNTH_INFO:
-      memcpy_tofs (&((char *) arg)[0], &mpu_synth_info[midi_dev], sizeof (struct synth_info));
+      copy_to_user (&((char *) arg)[0], &mpu_synth_info[midi_dev], sizeof (struct synth_info));
 
       return 0;
       break;

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