This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / sound / oss / hal2.c
index afe97c4..1f49d04 100644 (file)
@@ -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)