tree-wide: fix a very frequent spelling mistake
[safe/jmp/linux-2.6] / drivers / char / tty_ioctl.c
index 8116bb1..6bd5f88 100644 (file)
@@ -21,7 +21,6 @@
 #include <linux/module.h>
 #include <linux/bitops.h>
 #include <linux/mutex.h>
-#include <linux/smp_lock.h>
 
 #include <asm/io.h>
 #include <asm/uaccess.h>
@@ -316,7 +315,7 @@ EXPORT_SYMBOL(tty_termios_input_baud_rate);
  *     For maximal back compatibility with legacy SYS5/POSIX *nix behaviour
  *     we need to carefully set the bits when the user does not get the
  *     desired speed. We allow small margins and preserve as much of possible
- *     of the input intent to keep compatiblity.
+ *     of the input intent to keep compatibility.
  *
  *     Locking: Caller should hold termios lock. This is already held
  *     when calling this function from the driver termios handler.
@@ -394,9 +393,7 @@ void tty_termios_encode_baud_rate(struct ktermios *termios,
                termios->c_cflag |= (BOTHER << IBSHIFT);
 #else
        if (ifound == -1 || ofound == -1) {
-               static int warned;
-               if (!warned++)
-                       printk(KERN_WARNING "tty: Unable to return correct "
+               printk_once(KERN_WARNING "tty: Unable to return correct "
                          "speed data as your architecture needs updating.\n");
        }
 #endif
@@ -947,7 +944,6 @@ int tty_mode_ioctl(struct tty_struct *tty, struct file *file,
        void __user *p = (void __user *)arg;
        int ret = 0;
        struct ktermios kterm;
-       struct termiox ktermx;
 
        if (tty->driver->type == TTY_DRIVER_TYPE_PTY &&
            tty->driver->subtype == PTY_TYPE_MASTER)
@@ -1049,7 +1045,8 @@ int tty_mode_ioctl(struct tty_struct *tty, struct file *file,
                return ret;
 #endif
 #ifdef TCGETX
-       case TCGETX:
+       case TCGETX: {
+               struct termiox ktermx;
                if (real_tty->termiox == NULL)
                        return -EINVAL;
                mutex_lock(&real_tty->termios_mutex);
@@ -1058,6 +1055,7 @@ int tty_mode_ioctl(struct tty_struct *tty, struct file *file,
                if (copy_to_user(p, &ktermx, sizeof(struct termiox)))
                        ret = -EFAULT;
                return ret;
+       }
        case TCSETX:
                return set_termiox(real_tty, p, 0);
        case TCSETXW: