X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Foss%2Fes1370.c;h=57f9bc147699f6a24732907c7e6c80684209c5a6;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=68189853ac11bb1bd8a8936c3d5262ef7d81273c;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/sound/oss/es1370.c b/sound/oss/es1370.c index 68189853a..57f9bc147 100644 --- a/sound/oss/es1370.c +++ b/sound/oss/es1370.c @@ -1037,7 +1037,7 @@ static int es1370_open_mixdev(struct inode *inode, struct file *file) } VALIDATE_STATE(s); file->private_data = s; - return 0; + return nonseekable_open(inode, file); } static int es1370_release_mixdev(struct inode *inode, struct file *file) @@ -1147,8 +1147,6 @@ static ssize_t es1370_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 (!access_ok(VERIFY_WRITE, buffer, count)) @@ -1225,8 +1223,6 @@ static ssize_t es1370_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_dac2.mapped) return -ENXIO; if (!access_ok(VERIFY_READ, buffer, count)) @@ -1789,7 +1785,7 @@ static int es1370_open(struct inode *inode, struct file *file) s->open_mode |= file->f_mode & (FMODE_READ | FMODE_WRITE); up(&s->open_sem); init_MUTEX(&s->sem); - return 0; + return nonseekable_open(inode, file); } static int es1370_release(struct inode *inode, struct file *file) @@ -1841,8 +1837,6 @@ static ssize_t es1370_write_dac(struct file *file, const char __user *buffer, si int cnt; VALIDATE_STATE(s); - if (ppos != &file->f_pos) - return -ESPIPE; if (s->dma_dac1.mapped) return -ENXIO; if (!s->dma_dac1.ready && (ret = prog_dmabuf_dac1(s))) @@ -2222,7 +2216,7 @@ static int es1370_open_dac(struct inode *inode, struct file *file) spin_unlock_irqrestore(&s->lock, flags); s->open_mode |= FMODE_DAC; up(&s->open_sem); - return 0; + return nonseekable_open(inode, file); } static int es1370_release_dac(struct inode *inode, struct file *file) @@ -2265,8 +2259,6 @@ static ssize_t es1370_midi_read(struct file *file, char __user *buffer, size_t c int cnt; VALIDATE_STATE(s); - if (ppos != &file->f_pos) - return -ESPIPE; if (!access_ok(VERIFY_WRITE, buffer, count)) return -EFAULT; if (count == 0) @@ -2328,8 +2320,6 @@ static ssize_t es1370_midi_write(struct file *file, const char __user *buffer, s int cnt; VALIDATE_STATE(s); - if (ppos != &file->f_pos) - return -ESPIPE; if (!access_ok(VERIFY_READ, buffer, count)) return -EFAULT; if (count == 0) @@ -2464,7 +2454,7 @@ static int es1370_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 es1370_midi_release(struct inode *inode, struct file *file)