VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / sound / oss / esssolo1.c
index b5096b5..3002cbe 100644 (file)
@@ -933,7 +933,7 @@ static int solo1_open_mixdev(struct inode *inode, struct file *file)
                return -ENODEV;
                VALIDATE_STATE(s);
        file->private_data = s;
-       return 0;
+       return nonseekable_open(inode, file);
 }
 
 static int solo1_release_mixdev(struct inode *inode, struct file *file)
@@ -1010,8 +1010,6 @@ static ssize_t solo1_read(struct file *file, char __user *buffer, size_t count,
        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_adc(s)))
@@ -1106,8 +1104,6 @@ static ssize_t solo1_write(struct file *file, const char __user *buffer, size_t
        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_dac(s)))
@@ -1647,7 +1643,7 @@ static int solo1_open(struct inode *inode, struct file *file)
        s->open_mode |= file->f_mode & (FMODE_READ | FMODE_WRITE);
        up(&s->open_sem);
        prog_codec(s);
-       return 0;
+       return nonseekable_open(inode, file);
 }
 
 static /*const*/ struct file_operations solo1_audio_fops = {
@@ -1740,8 +1736,6 @@ static ssize_t solo1_midi_read(struct file *file, char __user *buffer, size_t co
        int cnt;
 
        VALIDATE_STATE(s);
-       if (ppos != &file->f_pos)
-               return -ESPIPE;
        if (!access_ok(VERIFY_WRITE, buffer, count))
                return -EFAULT;
        if (count == 0)
@@ -1803,8 +1797,6 @@ static ssize_t solo1_midi_write(struct file *file, const char __user *buffer, si
        int cnt;
 
        VALIDATE_STATE(s);
-       if (ppos != &file->f_pos)
-               return -ESPIPE;
        if (!access_ok(VERIFY_READ, buffer, count))
                return -EFAULT;
        if (count == 0)
@@ -1951,7 +1943,7 @@ static int solo1_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 solo1_midi_release(struct inode *inode, struct file *file)
@@ -2161,7 +2153,7 @@ static int solo1_dmfm_open(struct inode *inode, struct file *file)
        outb(1, s->sbbase+3);  /* enable OPL3 */
        s->open_mode |= FMODE_DMFM;
        up(&s->open_sem);
-       return 0;
+       return nonseekable_open(inode, file);
 }
 
 static int solo1_dmfm_release(struct inode *inode, struct file *file)