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
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,
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);
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;