patch-2.4.19 linux-2.4.19/drivers/sound/cs4281/cs4281m.c
Next file: linux-2.4.19/drivers/sound/cs46xx.c
Previous file: linux-2.4.19/drivers/sound/cs4281/cs4281_wrapper.h
Back to the patch index
Back to the overall index
- Lines: 63
- Date:
Fri Aug 2 17:39:44 2002
- Orig file:
linux-2.4.18/drivers/sound/cs4281/cs4281m.c
- Orig date:
Mon Feb 25 11:38:04 2002
diff -urN linux-2.4.18/drivers/sound/cs4281/cs4281m.c linux-2.4.19/drivers/sound/cs4281/cs4281m.c
@@ -2628,17 +2628,6 @@
}
}
-
-// ---------------------------------------------------------------------
-
-static loff_t cs4281_llseek(struct file *file, loff_t offset, int origin)
-{
- return -ESPIPE;
-}
-
-
-// ---------------------------------------------------------------------
-
static int cs4281_open_mixdev(struct inode *inode, struct file *file)
{
int minor = MINOR(inode->i_rdev);
@@ -2694,7 +2683,7 @@
// Mixer file operations struct.
// ******************************************************************************************
static /*const */ struct file_operations cs4281_mixer_fops = {
- llseek:cs4281_llseek,
+ llseek:no_llseek,
ioctl:cs4281_ioctl_mixdev,
open:cs4281_open_mixdev,
release:cs4281_release_mixdev,
@@ -3587,7 +3576,7 @@
if (s->dma_adc.mapped)
s->dma_adc.count &= s->dma_adc.fragsize - 1;
spin_unlock_irqrestore(&s->lock, flags);
- return copy_to_user((void *) arg, &cinfo, sizeof(cinfo));
+ return copy_to_user((void *) arg, &cinfo, sizeof(cinfo)) ? -EFAULT : 0;
case SNDCTL_DSP_GETOPTR:
if (!(file->f_mode & FMODE_WRITE))
@@ -3611,7 +3600,7 @@
if (s->dma_dac.mapped)
s->dma_dac.count &= s->dma_dac.fragsize - 1;
spin_unlock_irqrestore(&s->lock, flags);
- return copy_to_user((void *) arg, &cinfo, sizeof(cinfo));
+ return copy_to_user((void *) arg, &cinfo, sizeof(cinfo)) ? -EFAULT : 0;
case SNDCTL_DSP_GETBLKSIZE:
if (file->f_mode & FMODE_WRITE) {
@@ -3835,7 +3824,7 @@
// Wave (audio) file operations struct.
// ******************************************************************************************
static /*const */ struct file_operations cs4281_audio_fops = {
- llseek:cs4281_llseek,
+ llseek:no_llseek,
read:cs4281_read,
write:cs4281_write,
poll:cs4281_poll,
@@ -4184,7 +4173,7 @@
// Midi file operations struct.
// ******************************************************************************************
static /*const */ struct file_operations cs4281_midi_fops = {
- llseek:cs4281_llseek,
+ llseek:no_llseek,
read:cs4281_midi_read,
write:cs4281_midi_write,
poll:cs4281_midi_poll,
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)