X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Foss%2Fmaestro.c;h=4a670f4e4d3ae14e705d994951c171a9aac9e4e5;hb=5e3b93f248c98873cc843e83092bb8da92ac85a2;hp=66456dbb27272791334a2abd8795d51a0953d9bd;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/sound/oss/maestro.c b/sound/oss/maestro.c index 66456dbb2..4a670f4e4 100644 --- a/sound/oss/maestro.c +++ b/sound/oss/maestro.c @@ -2158,7 +2158,7 @@ static int ess_open_mixdev(struct inode *inode, struct file *file) if (!card) return -ENODEV; file->private_data = card; - return nonseekable_open(inode, file); + return 0; } static int ess_release_mixdev(struct inode *inode, struct file *file) @@ -2274,6 +2274,8 @@ ess_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) unsigned char *combbuf = NULL; 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))) @@ -2370,6 +2372,8 @@ ess_write(struct file *file, const char __user *buffer, size_t count, loff_t *pp 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))) @@ -3078,7 +3082,7 @@ ess_open(struct inode *inode, struct file *file) s->open_mode |= file->f_mode & (FMODE_READ | FMODE_WRITE); up(&s->open_sem); - return nonseekable_open(inode, file); + return 0; } static int