Skip to content

Commit

Permalink
[WATCHDOG] watchdog-driver-for-at32ap700x-devices-fix
Browse files Browse the repository at this point in the history
little fiddles.

Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
Andrew Morton authored and Wim Van Sebroeck committed Jun 10, 2007
1 parent a9cb395 commit c37f271
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions drivers/char/watchdog/at32ap700x_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
#include <linux/fs.h>
#include <linux/platform_device.h>
#include <linux/watchdog.h>

#include <asm/uaccess.h>
#include <asm/io.h>
#include <linux/uaccess.h>
#include <linux/io.h>

#define TIMEOUT_MIN 1
#define TIMEOUT_DEFAULT CONFIG_AT32AP700X_WDT_TIMEOUT
Expand Down Expand Up @@ -120,7 +119,10 @@ static int at32_wdt_settimeout(int time)
if ((time < TIMEOUT_MIN) || (time > TIMEOUT_MAX))
return -EINVAL;

/* Set new watchdog time. It will be used when at32_wdt_start() is called. */
/*
* Set new watchdog time. It will be used when at32_wdt_start() is
* called.
*/
wdt->timeout = time;
return 0;
}
Expand All @@ -141,7 +143,7 @@ static int at32_wdt_ioctl(struct inode *inode, struct file *file,
void __user *argp = (void __user *)arg;
int __user *p = argp;

switch(cmd) {
switch (cmd) {
case WDIOC_KEEPALIVE:
at32_wdt_pat();
ret = 0;
Expand Down Expand Up @@ -182,7 +184,8 @@ static int at32_wdt_ioctl(struct inode *inode, struct file *file,
return ret;
}

static ssize_t at32_wdt_write(struct file *file, const char *data, size_t len, loff_t *ppos)
static ssize_t at32_wdt_write(struct file *file, const char *data, size_t len,
loff_t *ppos)
{
at32_wdt_pat();
return len;
Expand Down

0 comments on commit c37f271

Please sign in to comment.