Commit 6abe78bf authored by Wim Van Sebroeck's avatar Wim Van Sebroeck

[WATCHDOG] Return value of nonseekable_open

Return the value of the nonseekable_open function and not 0.
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent f1869994
...@@ -45,7 +45,6 @@ static int boot_status; ...@@ -45,7 +45,6 @@ static int boot_status;
*/ */
static int sa1100dog_open(struct inode *inode, struct file *file) static int sa1100dog_open(struct inode *inode, struct file *file)
{ {
nonseekable_open(inode, file);
if (test_and_set_bit(1,&sa1100wdt_users)) if (test_and_set_bit(1,&sa1100wdt_users))
return -EBUSY; return -EBUSY;
...@@ -54,7 +53,7 @@ static int sa1100dog_open(struct inode *inode, struct file *file) ...@@ -54,7 +53,7 @@ static int sa1100dog_open(struct inode *inode, struct file *file)
OSSR = OSSR_M3; OSSR = OSSR_M3;
OWER = OWER_WME; OWER = OWER_WME;
OIER |= OIER_E3; OIER |= OIER_E3;
return 0; return nonseekable_open(inode, file);
} }
/* /*
......
...@@ -191,8 +191,6 @@ static ssize_t fop_write(struct file * file, const char __user * buf, size_t cou ...@@ -191,8 +191,6 @@ static ssize_t fop_write(struct file * file, const char __user * buf, size_t cou
static int fop_open(struct inode * inode, struct file * file) static int fop_open(struct inode * inode, struct file * file)
{ {
nonseekable_open(inode, file);
/* Just in case we're already talking to someone... */ /* Just in case we're already talking to someone... */
if(test_and_set_bit(0, &wdt_is_open)) if(test_and_set_bit(0, &wdt_is_open))
return -EBUSY; return -EBUSY;
...@@ -202,7 +200,7 @@ static int fop_open(struct inode * inode, struct file * file) ...@@ -202,7 +200,7 @@ static int fop_open(struct inode * inode, struct file * file)
/* Good, fire up the show */ /* Good, fire up the show */
wdt_startup(); wdt_startup();
return 0; return nonseekable_open(inode, file);
} }
static int fop_close(struct inode * inode, struct file * file) static int fop_close(struct inode * inode, struct file * file)
......
...@@ -150,8 +150,6 @@ static inline int sc1200wdt_status(void) ...@@ -150,8 +150,6 @@ static inline int sc1200wdt_status(void)
static int sc1200wdt_open(struct inode *inode, struct file *file) static int sc1200wdt_open(struct inode *inode, struct file *file)
{ {
nonseekable_open(inode, file);
/* allow one at a time */ /* allow one at a time */
if (down_trylock(&open_sem)) if (down_trylock(&open_sem))
return -EBUSY; return -EBUSY;
...@@ -162,7 +160,7 @@ static int sc1200wdt_open(struct inode *inode, struct file *file) ...@@ -162,7 +160,7 @@ static int sc1200wdt_open(struct inode *inode, struct file *file)
sc1200wdt_start(); sc1200wdt_start();
printk(KERN_INFO PFX "Watchdog enabled, timeout = %d min(s)", timeout); printk(KERN_INFO PFX "Watchdog enabled, timeout = %d min(s)", timeout);
return 0; return nonseekable_open(inode, file);
} }
......
...@@ -248,8 +248,6 @@ static ssize_t fop_write(struct file * file, const char __user * buf, size_t cou ...@@ -248,8 +248,6 @@ static ssize_t fop_write(struct file * file, const char __user * buf, size_t cou
static int fop_open(struct inode * inode, struct file * file) static int fop_open(struct inode * inode, struct file * file)
{ {
nonseekable_open(inode, file);
/* Just in case we're already talking to someone... */ /* Just in case we're already talking to someone... */
if(test_and_set_bit(0, &wdt_is_open)) if(test_and_set_bit(0, &wdt_is_open))
return -EBUSY; return -EBUSY;
...@@ -258,7 +256,7 @@ static int fop_open(struct inode * inode, struct file * file) ...@@ -258,7 +256,7 @@ static int fop_open(struct inode * inode, struct file * file)
/* Good, fire up the show */ /* Good, fire up the show */
wdt_startup(); wdt_startup();
return 0; return nonseekable_open(inode, file);
} }
static int fop_close(struct inode * inode, struct file * file) static int fop_close(struct inode * inode, struct file * file)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment