aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorWim Van Sebroeck <wim@iguana.be>2007-07-24 17:38:37 -0400
committerWim Van Sebroeck <wim@iguana.be>2007-07-24 17:39:52 -0400
commit6abe78bf195c633f67f6349e3d09b2bcd5d32a79 (patch)
treed3c000e492b61d783b7a5982a42572bce71c2640 /drivers/char
parentf18699940cf2952ce6bc4ea79eda6d37616275e0 (diff)
[WATCHDOG] Return value of nonseekable_open
Return the value of the nonseekable_open function and not 0. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/watchdog/sa1100_wdt.c3
-rw-r--r--drivers/char/watchdog/sbc60xxwdt.c4
-rw-r--r--drivers/char/watchdog/sc1200wdt.c4
-rw-r--r--drivers/char/watchdog/sc520_wdt.c4
4 files changed, 4 insertions, 11 deletions
diff --git a/drivers/char/watchdog/sa1100_wdt.c b/drivers/char/watchdog/sa1100_wdt.c
index 33c1137f17d6..3475f47aaa45 100644
--- a/drivers/char/watchdog/sa1100_wdt.c
+++ b/drivers/char/watchdog/sa1100_wdt.c
@@ -45,7 +45,6 @@ static int boot_status;
45 */ 45 */
46static int sa1100dog_open(struct inode *inode, struct file *file) 46static int sa1100dog_open(struct inode *inode, struct file *file)
47{ 47{
48 nonseekable_open(inode, file);
49 if (test_and_set_bit(1,&sa1100wdt_users)) 48 if (test_and_set_bit(1,&sa1100wdt_users))
50 return -EBUSY; 49 return -EBUSY;
51 50
@@ -54,7 +53,7 @@ static int sa1100dog_open(struct inode *inode, struct file *file)
54 OSSR = OSSR_M3; 53 OSSR = OSSR_M3;
55 OWER = OWER_WME; 54 OWER = OWER_WME;
56 OIER |= OIER_E3; 55 OIER |= OIER_E3;
57 return 0; 56 return nonseekable_open(inode, file);
58} 57}
59 58
60/* 59/*
diff --git a/drivers/char/watchdog/sbc60xxwdt.c b/drivers/char/watchdog/sbc60xxwdt.c
index b6282039198c..e4f3cb6090bc 100644
--- a/drivers/char/watchdog/sbc60xxwdt.c
+++ b/drivers/char/watchdog/sbc60xxwdt.c
@@ -191,8 +191,6 @@ static ssize_t fop_write(struct file * file, const char __user * buf, size_t cou
191 191
192static int fop_open(struct inode * inode, struct file * file) 192static int fop_open(struct inode * inode, struct file * file)
193{ 193{
194 nonseekable_open(inode, file);
195
196 /* Just in case we're already talking to someone... */ 194 /* Just in case we're already talking to someone... */
197 if(test_and_set_bit(0, &wdt_is_open)) 195 if(test_and_set_bit(0, &wdt_is_open))
198 return -EBUSY; 196 return -EBUSY;
@@ -202,7 +200,7 @@ static int fop_open(struct inode * inode, struct file * file)
202 200
203 /* Good, fire up the show */ 201 /* Good, fire up the show */
204 wdt_startup(); 202 wdt_startup();
205 return 0; 203 return nonseekable_open(inode, file);
206} 204}
207 205
208static int fop_close(struct inode * inode, struct file * file) 206static int fop_close(struct inode * inode, struct file * file)
diff --git a/drivers/char/watchdog/sc1200wdt.c b/drivers/char/watchdog/sc1200wdt.c
index 2f7ba7a514fe..9670d47190d0 100644
--- a/drivers/char/watchdog/sc1200wdt.c
+++ b/drivers/char/watchdog/sc1200wdt.c
@@ -150,8 +150,6 @@ static inline int sc1200wdt_status(void)
150 150
151static int sc1200wdt_open(struct inode *inode, struct file *file) 151static int sc1200wdt_open(struct inode *inode, struct file *file)
152{ 152{
153 nonseekable_open(inode, file);
154
155 /* allow one at a time */ 153 /* allow one at a time */
156 if (down_trylock(&open_sem)) 154 if (down_trylock(&open_sem))
157 return -EBUSY; 155 return -EBUSY;
@@ -162,7 +160,7 @@ static int sc1200wdt_open(struct inode *inode, struct file *file)
162 sc1200wdt_start(); 160 sc1200wdt_start();
163 printk(KERN_INFO PFX "Watchdog enabled, timeout = %d min(s)", timeout); 161 printk(KERN_INFO PFX "Watchdog enabled, timeout = %d min(s)", timeout);
164 162
165 return 0; 163 return nonseekable_open(inode, file);
166} 164}
167 165
168 166
diff --git a/drivers/char/watchdog/sc520_wdt.c b/drivers/char/watchdog/sc520_wdt.c
index 2676a43895a7..e8594c64d1e6 100644
--- a/drivers/char/watchdog/sc520_wdt.c
+++ b/drivers/char/watchdog/sc520_wdt.c
@@ -248,8 +248,6 @@ static ssize_t fop_write(struct file * file, const char __user * buf, size_t cou
248 248
249static int fop_open(struct inode * inode, struct file * file) 249static int fop_open(struct inode * inode, struct file * file)
250{ 250{
251 nonseekable_open(inode, file);
252
253 /* Just in case we're already talking to someone... */ 251 /* Just in case we're already talking to someone... */
254 if(test_and_set_bit(0, &wdt_is_open)) 252 if(test_and_set_bit(0, &wdt_is_open))
255 return -EBUSY; 253 return -EBUSY;
@@ -258,7 +256,7 @@ static int fop_open(struct inode * inode, struct file * file)
258 256
259 /* Good, fire up the show */ 257 /* Good, fire up the show */
260 wdt_startup(); 258 wdt_startup();
261 return 0; 259 return nonseekable_open(inode, file);
262} 260}
263 261
264static int fop_close(struct inode * inode, struct file * file) 262static int fop_close(struct inode * inode, struct file * file)