Commit f1a08cc9 authored by Wim Van Sebroeck's avatar Wim Van Sebroeck

[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: default avatarWim Van Sebroeck <wim@iguana.be>
parent de81225a
...@@ -132,10 +132,6 @@ static ssize_t ...@@ -132,10 +132,6 @@ static ssize_t
davinci_wdt_write(struct file *file, const char *data, size_t len, davinci_wdt_write(struct file *file, const char *data, size_t len,
loff_t *ppos) loff_t *ppos)
{ {
/* Can't seek (pwrite) on this device */
if (ppos != &file->f_pos)
return -ESPIPE;
if (len) if (len)
wdt_service(); wdt_service();
...@@ -143,7 +139,7 @@ davinci_wdt_write(struct file *file, const char *data, size_t len, ...@@ -143,7 +139,7 @@ davinci_wdt_write(struct file *file, const char *data, size_t len,
} }
static struct watchdog_info ident = { static struct watchdog_info ident = {
.options = WDIOF_CARDRESET | WDIOF_KEEPALIVEPING, .options = WDIOF_KEEPALIVEPING,
.identity = "DaVinci Watchdog", .identity = "DaVinci Watchdog",
}; };
...@@ -160,6 +156,7 @@ davinci_wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, ...@@ -160,6 +156,7 @@ davinci_wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
break; break;
case WDIOC_GETSTATUS: case WDIOC_GETSTATUS:
case WDIOC_GETBOOTSTATUS:
ret = put_user(0, (int *)arg); ret = put_user(0, (int *)arg);
break; break;
......
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