patch-2.1.13 linux/drivers/sound/ics2101.c

Next file: linux/drivers/sound/lowlevel/awe_wave.c
Previous file: linux/drivers/sound/gus_wave.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.12/linux/drivers/sound/ics2101.c linux/drivers/sound/ics2101.c
@@ -121,35 +121,41 @@
   if (((cmd >> 8) & 0xff) == 'M')
     {
       if (_IOC_DIR (cmd) & _IOC_WRITE)
-	switch (cmd & 0xff)
-	  {
-	  case SOUND_MIXER_RECSRC:
-	    return gus_default_mixer_ioctl (dev, cmd, arg);
-	    break;
-
-	  case SOUND_MIXER_MIC:
-	    return ioctl_out (arg, set_volumes (DEV_MIC, ioctl_in (arg)));
-	    break;
-
-	  case SOUND_MIXER_CD:
-	    return ioctl_out (arg, set_volumes (DEV_CD, ioctl_in (arg)));
-	    break;
-
-	  case SOUND_MIXER_LINE:
-	    return ioctl_out (arg, set_volumes (DEV_LINE, ioctl_in (arg)));
-	    break;
-
-	  case SOUND_MIXER_SYNTH:
-	    return ioctl_out (arg, set_volumes (DEV_GF1, ioctl_in (arg)));
-	    break;
-
-	  case SOUND_MIXER_VOLUME:
-	    return ioctl_out (arg, set_volumes (DEV_VOL, ioctl_in (arg)));
-	    break;
-
-	  default:
-	    return -EINVAL;
-	  }
+	{
+	  int             val;
+
+	  get_user (val, (int *) arg);
+
+	  switch (cmd & 0xff)
+	    {
+	    case SOUND_MIXER_RECSRC:
+	      return gus_default_mixer_ioctl (dev, cmd, arg);
+	      break;
+
+	    case SOUND_MIXER_MIC:
+	      return ioctl_out (arg, set_volumes (DEV_MIC, val));
+	      break;
+
+	    case SOUND_MIXER_CD:
+	      return ioctl_out (arg, set_volumes (DEV_CD, val));
+	      break;
+
+	    case SOUND_MIXER_LINE:
+	      return ioctl_out (arg, set_volumes (DEV_LINE, val));
+	      break;
+
+	    case SOUND_MIXER_SYNTH:
+	      return ioctl_out (arg, set_volumes (DEV_GF1, val));
+	      break;
+
+	    case SOUND_MIXER_VOLUME:
+	      return ioctl_out (arg, set_volumes (DEV_VOL, val));
+	      break;
+
+	    default:
+	      return -EINVAL;
+	    }
+	}
       else
 	switch (cmd & 0xff)	/*
 				 * Return parameters

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