patch-1.3.60 linux/drivers/char/wdt.c
Next file: linux/drivers/net/3c509.c
Previous file: linux/drivers/char/tpqic02.c
Back to the patch index
Back to the overall index
- Lines: 54
- Date:
Wed Feb 7 08:55:36 1996
- Orig file:
v1.3.59/linux/drivers/char/wdt.c
- Orig date:
Sun Jan 14 16:30:10 1996
diff -u --recursive --new-file v1.3.59/linux/drivers/char/wdt.c linux/drivers/char/wdt.c
@@ -15,8 +15,9 @@
* herein by reference. The driver is provided without warranty or
* support.
*
- * Release 0.04.
+ * Release 0.05.
*
+ * Some changes by Dave Gregorich to fix modularisation and minor bugs.
*/
#include <linux/config.h>
@@ -110,7 +111,7 @@
return -ESPIPE;
}
-static int wdt_write(struct inode *inode, struct file *file, char *buf, int count)
+static int wdt_write(struct inode *inode, struct file *file, const char *buf, int count)
{
/* Write a watchdog value */
inb_p(WDT_DC);
@@ -138,7 +139,7 @@
return err;
c*=11;
c/=15;
- cp=c;
+ cp=c+7;
memcpy_tofs(buf,&cp,1);
return 1;
default:
@@ -217,12 +218,14 @@
&wdt_fops
};
+#ifdef CONFIG_WDT_501
static struct mouse temp_mouse=
{
TEMP_MINOR,
"temperature",
&wdt_fops
};
+#endif
#ifdef MODULE
@@ -263,7 +266,9 @@
return -EIO;
}
mouse_register(&wdt_mouse);
+#ifdef CONFIG_WDT_501
mouse_register(&temp_mouse);
+#endif
request_region(io, 8, "wdt501");
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this