[PATCH] introduce fmode_t, do annotations
[safe/jmp/linux-2.6] / drivers / block / paride / pt.c
index 5ae2296..1e4006e 100644 (file)
@@ -667,7 +667,7 @@ static int pt_open(struct inode *inode, struct file *file)
                goto out;
 
        err = -EROFS;
-       if ((!(tape->flags & PT_WRITE_OK)) && (file->f_mode & 2))
+       if ((!(tape->flags & PT_WRITE_OK)) && (file->f_mode & FMODE_WRITE))
                goto out;
 
        if (!(iminor(inode) & 128))