This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / sound / oss / swarm_cs4297a.c
index 4846dc2..0f58fa4 100644 (file)
@@ -1524,6 +1524,14 @@ static int mixer_ioctl(struct cs4297a_state *s, unsigned int cmd,
 }
 
 
+// --------------------------------------------------------------------- 
+
+static loff_t cs4297a_llseek(struct file *file, loff_t offset, int origin)
+{
+       return -ESPIPE;
+}
+
+
 // --------------------------------------------------------------------- 
 
 static int cs4297a_open_mixdev(struct inode *inode, struct file *file)
@@ -1553,7 +1561,7 @@ static int cs4297a_open_mixdev(struct inode *inode, struct file *file)
        CS_DBGOUT(CS_FUNCTION | CS_OPEN, 4,
                  printk(KERN_INFO "cs4297a: cs4297a_open_mixdev()- 0\n"));
 
-       return nonseekable_open(inode, file);
+       return 0;
 }
 
 
@@ -1580,7 +1588,7 @@ static int cs4297a_ioctl_mixdev(struct inode *inode, struct file *file,
 // ******************************************************************************************
 static /*const */ struct file_operations cs4297a_mixer_fops = {
        .owner          = THIS_MODULE,
-       .llseek         = no_llseek,
+       .llseek         = cs4297a_llseek,
        .ioctl          = cs4297a_ioctl_mixdev,
        .open           = cs4297a_open_mixdev,
        .release        = cs4297a_release_mixdev,
@@ -1650,6 +1658,8 @@ static ssize_t cs4297a_read(struct file *file, char *buffer, size_t count,
                  printk(KERN_INFO "cs4297a: cs4297a_read()+ %d \n", count));
 
        VALIDATE_STATE(s);
+       if (ppos != &file->f_pos)
+               return -ESPIPE;
        if (s->dma_adc.mapped)
                return -ENXIO;
        if (!s->dma_adc.ready && (ret = prog_dmabuf_adc(s)))
@@ -1774,6 +1784,8 @@ static ssize_t cs4297a_write(struct file *file, const char *buffer,
                         count));
        VALIDATE_STATE(s);
 
+       if (ppos != &file->f_pos)
+               return -ESPIPE;
        if (s->dma_dac.mapped)
                return -ENXIO;
        if (!s->dma_dac.ready && (ret = prog_dmabuf_dac(s)))
@@ -2482,7 +2494,7 @@ static int cs4297a_open(struct inode *inode, struct file *file)
        }
        CS_DBGOUT(CS_FUNCTION | CS_OPEN, 2,
                  printk(KERN_INFO "cs4297a: cs4297a_open()- 0\n"));
-       return nonseekable_open(inode, file);
+       return 0;
 }
 
 
@@ -2491,7 +2503,7 @@ static int cs4297a_open(struct inode *inode, struct file *file)
 // ******************************************************************************************
 static /*const */ struct file_operations cs4297a_audio_fops = {
        .owner          = THIS_MODULE,
-       .llseek         = no_llseek,
+       .llseek         = cs4297a_llseek,
        .read           = cs4297a_read,
        .write          = cs4297a_write,
        .poll           = cs4297a_poll,