Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107830
b: refs/heads/master
c: 72d5c05
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Wim Van Sebroeck committed Jun 21, 2008
1 parent 0f3c5e9 commit ddd5215
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 84ca995c258df70a8914866e8c996845003ff938
refs/heads/master: 72d5c0505bafae1a393f50e169e20b682d37f28e
21 changes: 12 additions & 9 deletions trunk/drivers/watchdog/rm9k_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
#include <linux/notifier.h>
#include <linux/miscdevice.h>
#include <linux/watchdog.h>
#include <asm/io.h>
#include <linux/io.h>
#include <linux/uaccess.h>
#include <asm/atomic.h>
#include <asm/processor.h>
#include <asm/uaccess.h>
#include <asm/system.h>
#include <asm/rm9k-ocd.h>

Expand All @@ -53,10 +53,12 @@ static void wdt_gpi_stop(void);
static void wdt_gpi_set_timeout(unsigned int);
static int wdt_gpi_open(struct inode *, struct file *);
static int wdt_gpi_release(struct inode *, struct file *);
static ssize_t wdt_gpi_write(struct file *, const char __user *, size_t, loff_t *);
static ssize_t wdt_gpi_write(struct file *, const char __user *, size_t,
loff_t *);
static long wdt_gpi_ioctl(struct file *, unsigned int, unsigned long);
static int wdt_gpi_notify(struct notifier_block *, unsigned long, void *);
static const struct resource *wdt_gpi_get_resource(struct platform_device *, const char *, unsigned int);
static const struct resource *wdt_gpi_get_resource(struct platform_device *,
const char *, unsigned int);
static int __init wdt_gpi_probe(struct device *);
static int __exit wdt_gpi_remove(struct device *);

Expand All @@ -68,7 +70,7 @@ static int locked;


/* These are set from device resources */
static void __iomem * wd_regs;
static void __iomem *wd_regs;
static unsigned int wd_irq, wd_ctr;


Expand Down Expand Up @@ -216,7 +218,8 @@ static int wdt_gpi_release(struct inode *inode, struct file *file)
if (expect_close) {
wdt_gpi_stop();
free_irq(wd_irq, &miscdev);
printk(KERN_INFO "%s: watchdog stopped\n", wdt_gpi_name);
printk(KERN_INFO "%s: watchdog stopped\n",
wdt_gpi_name);
} else {
printk(KERN_CRIT "%s: unexpected close() -"
" watchdog left running\n",
Expand All @@ -241,8 +244,7 @@ wdt_gpi_write(struct file *f, const char __user *d, size_t s, loff_t *o)
return s ? 1 : 0;
}

static long
wdt_gpi_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
static long wdt_gpi_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
{
long res = -ENOTTY;
const long size = _IOC_SIZE(cmd);
Expand Down Expand Up @@ -271,7 +273,8 @@ wdt_gpi_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
case WDIOC_GETSUPPORT:
wdinfo.options = nowayout ?
WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING :
WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING | WDIOF_MAGICCLOSE;
WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING |
WDIOF_MAGICCLOSE;
res = __copy_to_user(argp, &wdinfo, size) ? -EFAULT : size;
break;

Expand Down

0 comments on commit ddd5215

Please sign in to comment.