X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Foss%2Ftrident.c;h=ed04f4007c2d0fbc6231656a5bfeb7951d1c9536;hb=90ad8654ffeb336af8c878fdf7bc72e2ac72467a;hp=1beb4e9ffe89ab570e43e1afea502f3f8e5a34a0;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/sound/oss/trident.c b/sound/oss/trident.c index 1beb4e9ff..ed04f4007 100644 --- a/sound/oss/trident.c +++ b/sound/oss/trident.c @@ -1874,6 +1874,8 @@ trident_read(struct file *file, char __user *buffer, size_t count, loff_t * ppos pr_debug("trident: trident_read called, count = %d\n", count); VALIDATE_STATE(state); + if (ppos != &file->f_pos) + return -ESPIPE; if (dmabuf->mapped) return -ENXIO; @@ -1990,6 +1992,8 @@ trident_write(struct file *file, const char __user *buffer, size_t count, loff_t pr_debug("trident: trident_write called, count = %d\n", count); VALIDATE_STATE(state); + if (ppos != &file->f_pos) + return -ESPIPE; /* * Guard against an mmap or ioctl while writing @@ -2819,7 +2823,7 @@ trident_open(struct inode *inode, struct file *file) pr_debug("trident: open virtual channel %d, hard channel %d\n", state->virt, dmabuf->channel->num); - return nonseekable_open(inode, file); + return 0; } static int @@ -4075,7 +4079,7 @@ trident_open_mixdev(struct inode *inode, struct file *file) match: file->private_data = card->ac97_codec[i]; - return nonseekable_open(inode, file); + return 0; } static int