X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Foss%2Fhal2.c;h=1f49d04242f37233a043f0f020f178a269b0d915;hb=73c4d347a0c98eb6599aefd1f9a91b4b071dd5e0;hp=afe97c4ce069a5e28caab718327010185812ee8d;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/sound/oss/hal2.c b/sound/oss/hal2.c index afe97c4ce..1f49d0424 100644 --- a/sound/oss/hal2.c +++ b/sound/oss/hal2.c @@ -959,7 +959,7 @@ static int hal2_open_mixdev(struct inode *inode, struct file *file) if (hal2) { file->private_data = hal2; - return nonseekable_open(inode, file); + return 0; } return -ENODEV; } @@ -1178,6 +1178,8 @@ static ssize_t hal2_read(struct file *file, char *buffer, if (!count) return 0; + if (ppos != &file->f_pos) + return -ESPIPE; if (down_interruptible(&adc->sem)) return -EINTR; if (file->f_flags & O_NONBLOCK) { @@ -1232,6 +1234,8 @@ static ssize_t hal2_write(struct file *file, const char *buffer, if (!count) return 0; + if (ppos != &file->f_pos) + return -ESPIPE; if (down_interruptible(&dac->sem)) return -EINTR; if (file->f_flags & O_NONBLOCK) { @@ -1346,7 +1350,7 @@ static int hal2_open(struct inode *inode, struct file *file) dac->usecount++; } - return nonseekable_open(inode, file); + return 0; } static int hal2_release(struct inode *inode, struct file *file)