patch-2.1.79 linux/drivers/char/pcwd.c

Next file: linux/drivers/char/psaux.c
Previous file: linux/drivers/char/c-qcam.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.78/linux/drivers/char/pcwd.c linux/drivers/char/pcwd.c
@@ -33,6 +33,7 @@
  * 971210       Disable board on initialisation in case board already ticking.
  * 971222       Changed open/close for temperature handling
  *              Michael Meskes <meskes@debian.org>.
+ * 980112       Used minor numbers from include/linux/miscdevice.h
  */
 
 #include <linux/module.h>
@@ -67,10 +68,6 @@
 static int pcwd_ioports[] = { 0x270, 0x350, 0x370, 0x000 };
 
 #define WD_VER                  "1.0 (11/18/96)"
-#define	WD_MINOR		130	/* Minor device number */
-#ifndef	TEMP_MINOR
-#define	TEMP_MINOR		131	/* Uses the same as WDT */
-#endif
 
 /*
  * It should be noted that PCWD_REVISION_B was removed because A and B
@@ -382,7 +379,7 @@
 {
         switch (MINOR(ino->i_rdev))
         {
-                case WD_MINOR:
+                case WATCHDOG_MINOR:
                     if (is_open)
                         return -EBUSY;
                     MOD_INC_USE_COUNT;
@@ -424,7 +421,7 @@
 static int pcwd_close(struct inode *ino, struct file *filep)
 {
 	MOD_DEC_USE_COUNT;
-	if (MINOR(ino->i_rdev)==WD_MINOR)
+	if (MINOR(ino->i_rdev)==WATCHDOG_MINOR)
 	{
 	        is_open = 0;
 #ifndef CONFIG_WATCHDOG_NOWAYOUT
@@ -527,8 +524,8 @@
 };
 
 static struct miscdevice pcwd_miscdev = {
-	WD_MINOR,
-	"pcwatchdog",
+	WATCHDOG_MINOR,
+	"watchdog",
 	&pcwd_fops
 };
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov