X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Foss%2Fnec_vrc5477.c;h=7ac7126664a7cfa9b0b7aebd0b02bb6f50da2654;hb=9c920a8402f2bb9bd931801d429b65f4eb6a262b;hp=b40611b422a0674de4a733d7bd6f9c233135c3d7;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/sound/oss/nec_vrc5477.c b/sound/oss/nec_vrc5477.c index b40611b42..7ac712666 100644 --- a/sound/oss/nec_vrc5477.c +++ b/sound/oss/nec_vrc5477.c @@ -868,7 +868,7 @@ static int vrc5477_ac97_open_mixdev(struct inode *inode, struct file *file) break; } file->private_data = s; - return nonseekable_open(inode, file); + return 0; } static int vrc5477_ac97_release_mixdev(struct inode *inode, struct file *file) @@ -1043,6 +1043,8 @@ vrc5477_ac97_read(struct file *file, int copyCount; size_t avail; + if (ppos != &file->f_pos) + return -ESPIPE; if (!access_ok(VERIFY_WRITE, buffer, count)) return -EFAULT; @@ -1227,6 +1229,8 @@ static ssize_t vrc5477_ac97_write(struct file *file, const char *buffer, unsigned long flags; int copyCount, avail; + if (ppos != &file->f_pos) + return -ESPIPE; if (!access_ok(VERIFY_READ, buffer, count)) return -EFAULT; ret = 0; @@ -1570,8 +1574,7 @@ static int vrc5477_ac97_open(struct inode *inode, struct file *file) struct list_head *list; struct vrc5477_ac97_state *s; int ret=0; - - nonseekable_open(inode, file); + for (list = devs.next; ; list = list->next) { if (list == &devs) return -ENODEV;