linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / char / epca.c
index 86d290e..765c5c1 100644 (file)
@@ -30,6 +30,7 @@
 /* See README.epca for change history --DAT*/
 
 
+#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
@@ -79,7 +80,7 @@ static int invalid_lilo_config;
 /* The ISA boards do window flipping into the same spaces so its only sane
    with a single lock. It's still pretty efficient */
 
-static DEFINE_SPINLOCK(epca_lock);
+static spinlock_t epca_lock = SPIN_LOCK_UNLOCKED;
 
 /* -----------------------------------------------------------------------
        MAXBOARDS is typically 12, but ISA and EISA cards are restricted to 
@@ -485,7 +486,8 @@ static void pc_close(struct tty_struct * tty, struct file * filp)
                } /* End channel is open more than once */
 
                /* Port open only once go ahead with shutdown & reset */
-               BUG_ON(ch->count < 0);
+               if (ch->count < 0)
+                       BUG();
 
                /* ---------------------------------------------------------------
                        Let the rest of the driver know the channel is being closed.
@@ -1231,6 +1233,7 @@ static int __init pc_init(void)
 
        pc_driver->owner = THIS_MODULE;
        pc_driver->name = "ttyD"; 
+       pc_driver->devfs_name = "tts/D";
        pc_driver->major = DIGI_MAJOR; 
        pc_driver->minor_start = 0;
        pc_driver->type = TTY_DRIVER_TYPE_SERIAL;