This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / sound / oss / sonicvibes.c
index 8bb6dea..e231cf0 100644 (file)
@@ -1252,7 +1252,7 @@ static int sv_open_mixdev(struct inode *inode, struct file *file)
        }
                VALIDATE_STATE(s);
        file->private_data = s;
-       return nonseekable_open(inode, file);
+       return 0;
 }
 
 static int sv_release_mixdev(struct inode *inode, struct file *file)
@@ -1325,6 +1325,8 @@ static ssize_t sv_read(struct file *file, char __user *buffer, size_t count, lof
        int cnt;
 
        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(s, 1)))
@@ -1408,6 +1410,8 @@ static ssize_t sv_write(struct file *file, const char __user *buffer, size_t cou
        int cnt;
 
        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(s, 0)))
@@ -1950,7 +1954,7 @@ static int sv_open(struct inode *inode, struct file *file)
        set_fmt(s, fmtm, fmts);
        s->open_mode |= file->f_mode & (FMODE_READ | FMODE_WRITE);
        up(&s->open_sem);
-       return nonseekable_open(inode, file);
+       return 0;
 }
 
 static int sv_release(struct inode *inode, struct file *file)
@@ -2001,6 +2005,8 @@ static ssize_t sv_midi_read(struct file *file, char __user *buffer, size_t count
        int cnt;
 
        VALIDATE_STATE(s);
+       if (ppos != &file->f_pos)
+               return -ESPIPE;
        if (!access_ok(VERIFY_WRITE, buffer, count))
                return -EFAULT;
        if (count == 0)
@@ -2062,6 +2068,8 @@ static ssize_t sv_midi_write(struct file *file, const char __user *buffer, size_
        int cnt;
 
        VALIDATE_STATE(s);
+       if (ppos != &file->f_pos)
+               return -ESPIPE;
        if (!access_ok(VERIFY_READ, buffer, count))
                return -EFAULT;
        if (count == 0)
@@ -2204,7 +2212,7 @@ static int sv_midi_open(struct inode *inode, struct file *file)
        spin_unlock_irqrestore(&s->lock, flags);
        s->open_mode |= (file->f_mode << FMODE_MIDI_SHIFT) & (FMODE_MIDI_READ | FMODE_MIDI_WRITE);
        up(&s->open_sem);
-       return nonseekable_open(inode, file);
+       return 0;
 }
 
 static int sv_midi_release(struct inode *inode, struct file *file)
@@ -2406,7 +2414,7 @@ static int sv_dmfm_open(struct inode *inode, struct file *file)
        outb(1, s->iosynth+3);  /* enable OPL3 */
        s->open_mode |= FMODE_DMFM;
        up(&s->open_sem);
-       return nonseekable_open(inode, file);
+       return 0;
 }
 
 static int sv_dmfm_release(struct inode *inode, struct file *file)