VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / sound / oss / sonicvibes.c
index e231cf0..8bb6dea 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 0;
+       return nonseekable_open(inode, file);
 }
 
 static int sv_release_mixdev(struct inode *inode, struct file *file)
@@ -1325,8 +1325,6 @@ 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)))
@@ -1410,8 +1408,6 @@ 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)))
@@ -1954,7 +1950,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 0;
+       return nonseekable_open(inode, file);
 }
 
 static int sv_release(struct inode *inode, struct file *file)
@@ -2005,8 +2001,6 @@ 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)
@@ -2068,8 +2062,6 @@ 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)
@@ -2212,7 +2204,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 0;
+       return nonseekable_open(inode, file);
 }
 
 static int sv_midi_release(struct inode *inode, struct file *file)
@@ -2414,7 +2406,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 0;
+       return nonseekable_open(inode, file);
 }
 
 static int sv_dmfm_release(struct inode *inode, struct file *file)