Commit 38a86160 authored by Rob Radez's avatar Rob Radez Committed by Linus Torvalds

[PATCH] drivers/char/pcwd.c

This patch to drivers/char/pcwd.c against 2.5.4 does two things:
a) Makes one code snippet more consistent with the rest of the code, and
b) Makes it possible for this code to actually work

Nearly the same patch against 2.4 was reviewed by Alan, and, well, the
maintainer seems to have disappeared.  It's also looking like no one uses
this driver much either.

Regards,
Rob Radez
parent 3d0883be
......@@ -238,7 +238,7 @@ static void pcwd_send_heartbeat(void)
static int pcwd_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
int i, cdat, rv;
int cdat, rv;
static struct watchdog_info ident=
{
WDIOF_OVERHEAT|WDIOF_CARDRESET,
......@@ -251,8 +251,9 @@ static int pcwd_ioctl(struct inode *inode, struct file *file,
return -ENOTTY;
case WDIOC_GETSUPPORT:
i = copy_to_user((void*)arg, &ident, sizeof(ident));
return i ? -EFAULT : 0;
if(copy_to_user((void*)arg, &ident, sizeof(ident)))
return -EFAULT;
return 0;
case WDIOC_GETSTATUS:
spin_lock(&io_lock);
......@@ -575,7 +576,6 @@ static int __init pcwatchdog_init(void)
printk("pcwd: v%s Ken Hollis (kenji@bitgate.com)\n", WD_VER);
/* Initial variables */
set_bit( 0, &open_allowed );
supports_temp = 0;
mode_debug = 0;
temp_panic = 0;
......
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