Merge branch 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 2 Dec 2010 20:58:16 +0000 (12:58 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 2 Dec 2010 20:58:16 +0000 (12:58 -0800)
* 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6:
  serial: mfd: adjust the baud rate setting
  TTY: open/hangup race fixup
  TTY: don't allow reopen when ldisc is changing
  NET: wan/x25, fix ldisc->open retval
  TTY: ldisc, fix open flag handling
  serial8250: Mark console as CON_ANYTIME

1  2 
drivers/net/wan/x25_asy.c
include/linux/tty.h

@@@ -498,6 -498,7 +498,6 @@@ norbuff
  static int x25_asy_close(struct net_device *dev)
  {
        struct x25_asy *sl = netdev_priv(dev);
 -      int err;
  
        spin_lock(&sl->lock);
        if (sl->tty)
        netif_stop_queue(dev);
        sl->rcount = 0;
        sl->xleft  = 0;
 -      err = lapb_unregister(dev);
 -      if (err != LAPB_OK)
 -              printk(KERN_ERR "x25_asy_close: lapb_unregister error -%d\n",
 -                      err);
        spin_unlock(&sl->lock);
        return 0;
  }
@@@ -577,7 -582,7 +577,7 @@@ static int x25_asy_open_tty(struct tty_
        if (err)
                return err;
        /* Done.  We have linked the TTY line to a channel. */
-       return sl->dev->base_addr;
+       return 0;
  }
  
  
  static void x25_asy_close_tty(struct tty_struct *tty)
  {
        struct x25_asy *sl = tty->disc_data;
 +      int err;
  
        /* First make sure we're connected. */
        if (!sl || sl->magic != X25_ASY_MAGIC)
                dev_close(sl->dev);
        rtnl_unlock();
  
 +      err = lapb_unregister(sl->dev);
 +      if (err != LAPB_OK)
 +              printk(KERN_ERR "x25_asy_close: lapb_unregister error -%d\n",
 +                      err);
 +
        tty->disc_data = NULL;
        sl->tty = NULL;
        x25_asy_free(sl);
diff --combined include/linux/tty.h
@@@ -13,6 -13,7 +13,6 @@@
  #include <linux/tty_driver.h>
  #include <linux/tty_ldisc.h>
  #include <linux/mutex.h>
 -#include <linux/smp_lock.h>
  
  #include <asm/system.h>
  
@@@ -366,6 -367,7 +366,7 @@@ struct tty_file_private 
  #define TTY_HUPPED            18      /* Post driver->hangup() */
  #define TTY_FLUSHING          19      /* Flushing to ldisc in progress */
  #define TTY_FLUSHPENDING      20      /* Queued buffer flush pending */
+ #define TTY_HUPPING           21      /* ->hangup() in progress */
  
  #define TTY_WRITE_FLUSH(tty) tty_write_flush((tty))