X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Foss%2Fcmpci.c;h=c0da38bcdfc96c75e8eb78b51acc1980cf2798ac;hb=5d0dd51ddb446e7c058023420f5b7d4404501980;hp=386107f47bd432166552daa721f127ee3f6377c1;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/sound/oss/cmpci.c b/sound/oss/cmpci.c index 386107f47..c0da38bcd 100644 --- a/sound/oss/cmpci.c +++ b/sound/oss/cmpci.c @@ -1852,7 +1852,7 @@ static int cm_open_mixdev(struct inode *inode, struct file *file) } VALIDATE_STATE(s); file->private_data = s; - return nonseekable_open(inode, file); + return 0; } static int cm_release_mixdev(struct inode *inode, struct file *file) @@ -1926,6 +1926,8 @@ static ssize_t cm_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))) @@ -2026,6 +2028,8 @@ static ssize_t cm_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))) @@ -2874,7 +2878,7 @@ static int cm_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 cm_release(struct inode *inode, struct file *file)