lkml.org 
[lkml]   [1997]   [Jan]   [15]   [last100]   RSS Feed
Views: [more markup]   [less markup]   [headers]   [forward]  
 
Messages in this thread
Patch in this message
/
FromKeith Owens <>
Subject2.1.21-patch_drivers_sound-1
DateWed, 15 Jan 1997 18:38:28 +1100
Remove unused variable.  Change aci.to c use the new form of get_user,
needs to be checked by developer (no hardware to test on).

diff -ur linux-2.1.21.orig/drivers/sound/cs4232.c linux/drivers/sound/cs4232.c
--- linux-2.1.21.orig/drivers/sound/cs4232.c	Fri Nov 15 19:15:13 1996
+++ linux/drivers/sound/cs4232.c	Wed Jan 15 14:09:59 1997
@@ -25,8 +25,6 @@
 #define KEY_PORT	0x279	/* Same as LPT1 status port */
 #define CSN_NUM		0x99	/* Just a random number */
 
-static int     *osp;
-
 static void 
 CS_OUT (unsigned char a)
 {
diff -ur linux-2.1.21.orig/drivers/sound/lowlevel/aci.c linux/drivers/sound/lowlevel/aci.c
--- linux-2.1.21.orig/drivers/sound/lowlevel/aci.c	Fri Oct 25 20:06:35 1996
+++ linux/drivers/sound/lowlevel/aci.c	Wed Jan 15 12:39:31 1997
@@ -292,7 +292,7 @@
   int vol, ret;
   unsigned param;
 
-  param = get_user((int *) arg);
+  get_user(param, (int *) arg);
   /* left channel */
   vol = param & 0xff;
   if (vol > 100) vol = 100;
@@ -313,13 +313,13 @@
 static int
 aci_mixer_ioctl (int dev, unsigned int cmd, caddr_t arg)
 {
-  int status, vol;
+  int status, vol, i;
   unsigned char buf;
 
   /* handle solo mode control */
   if (cmd == SOUND_MIXER_PRIVATE1) {
-    if (get_user((int *) arg) >= 0) {
-      aci_solo = !!get_user((int *) arg);
+    if (get_user(i, (int *) arg) >= 0) {
+      aci_solo = !!i;
       if (write_cmd(0xd2, aci_solo)) return -EIO;
     } else if (aci_version >= 0xb0) {
       if ((status = read_general_status()) < 0) return -EIO;
@@ -349,7 +349,8 @@
       case SOUND_MIXER_LINE2:  /* AUX2 */
 	return setvolume(arg, 0x3e, 0x36);
       case SOUND_MIXER_IGAIN:  /* MIC pre-amp */
-	vol = get_user((int *) arg) & 0xff;
+	get_user(vol, (int *) arg);
+	vol &= 0xff;
 	if (vol > 100) vol = 100;
 	vol = SCALE(100, 3, vol);
 	if (write_cmd(0x03, vol)) return -EIO;


\
 
 \ /
  Last update: 2005-03-22 12:38    [W:1.218 / U:0.110 seconds]
©2003-2008 Jasper Spaans