]> err.no Git - linux-2.6/blobdiff - drivers/serial/crisv10.c
[POWERPC] spufs: lockdep annotations for spufs_dir_close
[linux-2.6] / drivers / serial / crisv10.c
index a4e23cf47906960ba53396984d6e0d3e531619b3..88e7c1d5b919f455b47658367b9b7d835d849ba9 100644 (file)
@@ -68,11 +68,6 @@ static char *serial_version = "$Revision: 1.25 $";
 
 struct tty_driver *serial_driver;
 
-/* serial subtype definitions */
-#ifndef SERIAL_TYPE_NORMAL
-#define SERIAL_TYPE_NORMAL     1
-#endif
-
 /* number of characters left in xmit buffer before we ask for more */
 #define WAKEUP_CHARS 256
 
@@ -3587,6 +3582,8 @@ rs_tiocmset(struct tty_struct *tty, struct file *file,
 {
        struct e100_serial *info = (struct e100_serial *)tty->driver_data;
 
+       lock_kernel();
+
        if (clear & TIOCM_RTS)
                e100_rts(info, 0);
        if (clear & TIOCM_DTR)
@@ -3606,6 +3603,8 @@ rs_tiocmset(struct tty_struct *tty, struct file *file,
                e100_ri_out(info, 1);
        if (set & TIOCM_CD)
                e100_cd_out(info, 1);
+
+       unlock_kernel();
        return 0;
 }
 
@@ -3615,6 +3614,7 @@ rs_tiocmget(struct tty_struct *tty, struct file *file)
        struct e100_serial *info = (struct e100_serial *)tty->driver_data;
        unsigned int result;
 
+       lock_kernel();
        result =
                (!E100_RTS_GET(info) ? TIOCM_RTS : 0)
                | (!E100_DTR_GET(info) ? TIOCM_DTR : 0)
@@ -3623,6 +3623,8 @@ rs_tiocmget(struct tty_struct *tty, struct file *file)
                | (!E100_CD_GET(info) ? TIOCM_CAR : 0)
                | (!E100_CTS_GET(info) ? TIOCM_CTS : 0);
 
+       unlock_kernel();
+
 #ifdef SERIAL_DEBUG_IO
        printk(KERN_DEBUG "ser%i: modem state: %i 0x%08X\n",
                info->line, result, result);