X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=sound%2Foss%2Fes1371.c;h=d6b59fbe5ad3c40dbc0db1b3ab94a7701d102640;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=7d1a108dde35c97d1cf80d4ff43cae52d9efb7d2;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/sound/oss/es1371.c b/sound/oss/es1371.c index 7d1a108dd..d6b59fbe5 100644 --- a/sound/oss/es1371.c +++ b/sound/oss/es1371.c @@ -1223,7 +1223,7 @@ static int es1371_open_mixdev(struct inode *inode, struct file *file) } VALIDATE_STATE(s); file->private_data = s; - return 0; + return nonseekable_open(inode, file); } static int es1371_release_mixdev(struct inode *inode, struct file *file) @@ -1334,8 +1334,6 @@ static ssize_t es1371_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)) @@ -1413,8 +1411,6 @@ static ssize_t es1371_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)) @@ -1978,7 +1974,7 @@ static int es1371_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 es1371_release(struct inode *inode, struct file *file) @@ -2029,8 +2025,6 @@ static ssize_t es1371_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))) @@ -2400,7 +2394,7 @@ static int es1371_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 es1371_release_dac(struct inode *inode, struct file *file) @@ -2443,8 +2437,6 @@ static ssize_t es1371_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) @@ -2506,8 +2498,6 @@ static ssize_t es1371_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) @@ -2642,7 +2632,7 @@ static int es1371_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 es1371_midi_release(struct inode *inode, struct file *file)