X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Foss%2Fau1000.c;h=0ad69a2e77714f8112cdd60b87cae3af99656079;hb=902d44426afe46356253fe93d8cef2b4d9f236f3;hp=ccfbad2dd02fbba35cea528f0d703659fc7098c5;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/sound/oss/au1000.c b/sound/oss/au1000.c index ccfbad2dd..0ad69a2e7 100644 --- a/sound/oss/au1000.c +++ b/sound/oss/au1000.c @@ -886,7 +886,7 @@ static loff_t au1000_llseek(struct file *file, loff_t offset, int origin) static int au1000_open_mixdev(struct inode *inode, struct file *file) { file->private_data = &au1000_state; - return nonseekable_open(inode, file); + return 0; } static int au1000_release_mixdev(struct inode *inode, struct file *file) @@ -1120,6 +1120,8 @@ static ssize_t au1000_read(struct file *file, char *buffer, unsigned long flags; int cnt, usercnt, avail; + if (ppos != &file->f_pos) + return -ESPIPE; if (db->mapped) return -ENXIO; if (!access_ok(VERIFY_WRITE, buffer, count)) @@ -1202,6 +1204,8 @@ static ssize_t au1000_write(struct file *file, const char *buffer, dbg("write: count=%d", count); #endif + if (ppos != &file->f_pos) + return -ESPIPE; if (db->mapped) return -ENXIO; if (!access_ok(VERIFY_READ, buffer, count)) @@ -1903,7 +1907,7 @@ static int au1000_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 nonseekable_open(inode, file); + return 0; } static int au1000_release(struct inode *inode, struct file *file)