diff options
author | Wim Van Sebroeck <wim@iguana.be> | 2007-07-20 17:47:55 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2007-07-23 13:24:38 -0400 |
commit | f1a08cc9a1a8f1da79ca751469ecff82be110482 (patch) | |
tree | 6fbaa129dd1445de663596e665a874ad0cda5393 /drivers | |
parent | de81225a8719494f5149980ea8a50de28da653f6 (diff) |
[WATCHDOG] davinci_wdt clean-up
* Remove the redundant check for pwrite(), given that the open() routine
already invokes nonseekable_open().
* The WDIOF_CARDRESET flag can only be used when you can read this status
via the WDIOC_GETSTATUS ioctl call.
* Add the mandatory WDIOC_GETBOOTSTATUS ioctl call.
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/watchdog/davinci_wdt.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/char/watchdog/davinci_wdt.c b/drivers/char/watchdog/davinci_wdt.c index 27b4f66c000b..19db5302ba6e 100644 --- a/drivers/char/watchdog/davinci_wdt.c +++ b/drivers/char/watchdog/davinci_wdt.c | |||
@@ -132,10 +132,6 @@ static ssize_t | |||
132 | davinci_wdt_write(struct file *file, const char *data, size_t len, | 132 | davinci_wdt_write(struct file *file, const char *data, size_t len, |
133 | loff_t *ppos) | 133 | loff_t *ppos) |
134 | { | 134 | { |
135 | /* Can't seek (pwrite) on this device */ | ||
136 | if (ppos != &file->f_pos) | ||
137 | return -ESPIPE; | ||
138 | |||
139 | if (len) | 135 | if (len) |
140 | wdt_service(); | 136 | wdt_service(); |
141 | 137 | ||
@@ -143,7 +139,7 @@ davinci_wdt_write(struct file *file, const char *data, size_t len, | |||
143 | } | 139 | } |
144 | 140 | ||
145 | static struct watchdog_info ident = { | 141 | static struct watchdog_info ident = { |
146 | .options = WDIOF_CARDRESET | WDIOF_KEEPALIVEPING, | 142 | .options = WDIOF_KEEPALIVEPING, |
147 | .identity = "DaVinci Watchdog", | 143 | .identity = "DaVinci Watchdog", |
148 | }; | 144 | }; |
149 | 145 | ||
@@ -160,6 +156,7 @@ davinci_wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | |||
160 | break; | 156 | break; |
161 | 157 | ||
162 | case WDIOC_GETSTATUS: | 158 | case WDIOC_GETSTATUS: |
159 | case WDIOC_GETBOOTSTATUS: | ||
163 | ret = put_user(0, (int *)arg); | 160 | ret = put_user(0, (int *)arg); |
164 | break; | 161 | break; |
165 | 162 | ||