patch-2.1.77 linux/drivers/sound/dmabuf.c

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

diff -u --recursive --new-file v2.1.76/linux/drivers/sound/dmabuf.c linux/drivers/sound/dmabuf.c
@@ -121,24 +121,38 @@
 }
 
 
-static unsigned int
-default_set_bits(int dev, unsigned int bits)
+static unsigned int default_set_bits(int dev, unsigned int bits)
 {
-	return audio_devs[dev]->d->ioctl(dev, SNDCTL_DSP_SETFMT, (caddr_t) & bits);
+	mm_segment_t fs = get_fs();
+	unsigned int r;
+
+	set_fs(get_ds());
+	r = audio_devs[dev]->d->ioctl(dev, SNDCTL_DSP_SETFMT, (caddr_t)&bits);
+	set_fs(fs);
+	return r;
 }
 
-static int
-default_set_speed(int dev, int speed)
+static int default_set_speed(int dev, int speed)
 {
-	return audio_devs[dev]->d->ioctl(dev, SNDCTL_DSP_SPEED, (caddr_t) & speed);
+	mm_segment_t fs = get_fs();
+	int r;
+
+	set_fs(get_ds());
+	r = audio_devs[dev]->d->ioctl(dev, SNDCTL_DSP_SPEED, (caddr_t)&speed);
+	set_fs(fs);
+	return r;
 }
 
-static short
-default_set_channels(int dev, short channels)
+static short default_set_channels(int dev, short channels)
 {
-	int             c = channels;
+	int c = channels;
+	mm_segment_t fs = get_fs();
+	short r;
 
-	return audio_devs[dev]->d->ioctl(dev, SNDCTL_DSP_CHANNELS, (caddr_t) & c);
+	set_fs(get_ds());
+	r = audio_devs[dev]->d->ioctl(dev, SNDCTL_DSP_CHANNELS, (caddr_t)&c);
+	set_fs(fs);
+	return r;
 }
 
 static void

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