Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107834
b: refs/heads/master
c: 619a8a2
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Wim Van Sebroeck committed Jun 21, 2008
1 parent 0bfa7ab commit b240952
Show file tree
Hide file tree
Showing 2 changed files with 8 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: 1780de41406d783aa57459ba636a09aeda21d180
refs/heads/master: 619a8a2bb1d0c3f8270da4496a30f1e83e6eab5e
16 changes: 7 additions & 9 deletions trunk/drivers/watchdog/sbc7240_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
#include <linux/reboot.h>
#include <linux/types.h>
#include <linux/watchdog.h>
#include <linux/io.h>
#include <linux/uaccess.h>
#include <asm/atomic.h>
#include <asm/io.h>
#include <asm/system.h>
#include <asm/uaccess.h>

#define SBC7240_PREFIX "sbc7240_wdt: "

Expand Down Expand Up @@ -159,7 +159,7 @@ static int fop_close(struct inode *inode, struct file *file)
return 0;
}

static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_KEEPALIVEPING|
WDIOF_SETTIMEOUT|
WDIOF_MAGICCLOSE,
Expand All @@ -168,14 +168,12 @@ static struct watchdog_info ident = {
};


static int fop_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
unsigned long arg)
static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
switch (cmd) {
case WDIOC_GETSUPPORT:
return copy_to_user
((void __user *)arg, &ident, sizeof(ident))
? -EFAULT : 0;
return copy_to_user((void __user *)arg, &ident, sizeof(ident))
? -EFAULT : 0;
case WDIOC_GETSTATUS:
case WDIOC_GETBOOTSTATUS:
return put_user(0, (int __user *)arg);
Expand Down Expand Up @@ -225,7 +223,7 @@ static const struct file_operations wdt_fops = {
.write = fop_write,
.open = fop_open,
.release = fop_close,
.ioctl = fop_ioctl,
.unlocked_ioctl = fop_ioctl,
};

static struct miscdevice wdt_miscdev = {
Expand Down

0 comments on commit b240952

Please sign in to comment.