diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-09-02 15:28:45 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-21 07:47:06 -0400 |
commit | aeb5d727062a0238a2f96c9c380fbd2be4640c6f (patch) | |
tree | 51dae8a071fcf42e4431a66d37c5b843c8e99cf6 /drivers/char | |
parent | 2515ddc6db8eb49a79f0fe5e67ff09ac7c81eab4 (diff) |
[PATCH] introduce fmode_t, do annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/nvram.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c index 39f6357e3b5d..8054ee839b3c 100644 --- a/drivers/char/nvram.c +++ b/drivers/char/nvram.c | |||
@@ -338,7 +338,7 @@ nvram_open(struct inode *inode, struct file *file) | |||
338 | 338 | ||
339 | if ((nvram_open_cnt && (file->f_flags & O_EXCL)) || | 339 | if ((nvram_open_cnt && (file->f_flags & O_EXCL)) || |
340 | (nvram_open_mode & NVRAM_EXCL) || | 340 | (nvram_open_mode & NVRAM_EXCL) || |
341 | ((file->f_mode & 2) && (nvram_open_mode & NVRAM_WRITE))) { | 341 | ((file->f_mode & FMODE_WRITE) && (nvram_open_mode & NVRAM_WRITE))) { |
342 | spin_unlock(&nvram_state_lock); | 342 | spin_unlock(&nvram_state_lock); |
343 | unlock_kernel(); | 343 | unlock_kernel(); |
344 | return -EBUSY; | 344 | return -EBUSY; |
@@ -346,7 +346,7 @@ nvram_open(struct inode *inode, struct file *file) | |||
346 | 346 | ||
347 | if (file->f_flags & O_EXCL) | 347 | if (file->f_flags & O_EXCL) |
348 | nvram_open_mode |= NVRAM_EXCL; | 348 | nvram_open_mode |= NVRAM_EXCL; |
349 | if (file->f_mode & 2) | 349 | if (file->f_mode & FMODE_WRITE) |
350 | nvram_open_mode |= NVRAM_WRITE; | 350 | nvram_open_mode |= NVRAM_WRITE; |
351 | nvram_open_cnt++; | 351 | nvram_open_cnt++; |
352 | 352 | ||
@@ -366,7 +366,7 @@ nvram_release(struct inode *inode, struct file *file) | |||
366 | /* if only one instance is open, clear the EXCL bit */ | 366 | /* if only one instance is open, clear the EXCL bit */ |
367 | if (nvram_open_mode & NVRAM_EXCL) | 367 | if (nvram_open_mode & NVRAM_EXCL) |
368 | nvram_open_mode &= ~NVRAM_EXCL; | 368 | nvram_open_mode &= ~NVRAM_EXCL; |
369 | if (file->f_mode & 2) | 369 | if (file->f_mode & FMODE_WRITE) |
370 | nvram_open_mode &= ~NVRAM_WRITE; | 370 | nvram_open_mode &= ~NVRAM_WRITE; |
371 | 371 | ||
372 | spin_unlock(&nvram_state_lock); | 372 | spin_unlock(&nvram_state_lock); |