1. 21 Sep, 2009 7 commits
  2. 20 Sep, 2009 21 commits
  3. 19 Sep, 2009 12 commits
    • Wolfram Sang's avatar
      [PATCH] i2c-imx: make bus available early · 5d3f3331
      Wolfram Sang authored
      As I2C is used by PMICs also, make the busses available early via
      subsys_initcall().
      Signed-off-by: default avatarWolfram Sang <w.sang@pengutronix.de>
      Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
      5d3f3331
    • Mikael Pettersson's avatar
      i2c-mv64xxx: correct mv64xxx_i2c_intr() return type · b0999cc5
      Mikael Pettersson authored
      The mv64xxx_i2c_intr() irq handler in drivers/i2c/busses/i2c-mv64xxx.c
      is declared as returning 'int', resulting in this compile-time warning:
      
      drivers/i2c/busses/i2c-mv64xxx.c: In function 'mv64xxx_i2c_probe':
      drivers/i2c/busses/i2c-mv64xxx.c:540: warning: passing argument 2 of 'request_irq' from incompatible pointer type
      
      Fix: correct the return type to 'irqreturn_t'.
      Signed-off-by: default avatarMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
      b0999cc5
    • Alan Stern's avatar
      USB serial: update the console driver · 7bd032dc
      Alan Stern authored
      This patch (as1292) modifies the USB serial console driver, to make it
      compatible with the recent changes to the USB serial core.  The most
      important change is that serial->disc_mutex now has to be unlocked
      following a successful call to usb_serial_get_by_index().
      
      Other less notable changes include:
      
      	Use the requested port number instead of port 0 always.
      
      	Prevent the serial device from being autosuspended.
      
      	Use the ASYNCB_INITIALIZED flag bit to indicate when the
      	port hardware has been initialized.
      
      In spite of these changes, there's no question that the USB serial
      console code is still a big hack.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      7bd032dc
    • Alan Stern's avatar
      usb-serial: straighten out serial_open · 320348c8
      Alan Stern authored
      This patch (as1291) removes a bunch of code from serial_open(), things
      that were rendered unnecessary by earlier patches.  A missing spinlock
      is added to protect port->port.count, which needs to be incremented
      even if the open fails but not if the tty has gotten a hangup.  The
      test for whether the hardware has been initialized, based on the use
      count, is replaced by a more transparent test of the
      ASYNCB_INITIALIZED bit in the port flags.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      320348c8
    • Alan Stern's avatar
      usb-serial: add missing tests and debug lines · ff8324df
      Alan Stern authored
      This patch (as1290) adds some missing tests.  serial_down() isn't
      supposed to do anything if the hardware hasn't been initialized, and
      serial_close() isn't supposed to do anything if the tty has gotten a
      hangup (because serial_hangup() takes care of shutting down the
      hardware).
      
      The patch also updates and adds a few debugging lines.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      ff8324df
    • Alan Stern's avatar
      usb-serial: rename subroutines · 74556123
      Alan Stern authored
      This patch (as1289) renames serial_do_down() to serial_down() and
      serial_do_free() to serial_release().  It also adds a missing call to
      tty_shutdown() in serial_release().
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      74556123
    • Alan Stern's avatar
      usb-serial: fix termios initialization logic · 7e29bb4b
      Alan Stern authored
      This patch (as1288) fixes the initialization logic in
      serial_install().  A new tty always needs to have a termios
      initialized no matter what, not just in the case where the lower
      driver will override the termios settings.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      7e29bb4b
    • Alan Stern's avatar
      usb-serial: acquire references when a new tty is installed · cc56cd01
      Alan Stern authored
      This patch (as1287) makes serial_install() be reponsible for acquiring
      references to the usb_serial structure and the driver module when a
      tty is first used.  This is more sensible than having serial_open() do
      it, because a tty can be opened many times whereas it is installed
      only once, when it is created.  (Not to mention that these actions are
      reversed when the tty is released, not when it is closed.)  Finally,
      it is at install time that the TTY core takes its own reference to the
      usb_serial module, so it is only fitting that we should act the same
      way in regard to the lower-level serial driver.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      cc56cd01
    • Alan Stern's avatar
      usb-serial: change logic of serial lookups · 8bc2c1b2
      Alan Stern authored
      This patch (as1286) changes usb_serial_get_by_index().  Now the
      routine will check whether the serial device has been disconnected; if
      it has then the return value will be NULL.  If the device hasn't been
      disconnected then the routine will return with serial->disc_mutex
      held, so that the caller can use the structure without fear of racing
      against driver unloads.
      
      This permits the scope of table_mutex in destroy_serial() to be
      reduced.  Instead of protecting the entire function, it suffices to
      protect the part that actually uses serial_table[], i.e., the call to
      return_serial().  There's no longer any danger of the refcount being
      incremented after it reaches 0 (which was the reason for having the
      large scope previously), because it can't reach 0 until the serial
      device has been disconnected.
      
      Also, the patch makes serial_install() check that serial is non-NULL
      before attempting to use it.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      8bc2c1b2
    • Alan Stern's avatar
      usb-serial: put subroutines in logical order · f5b0953a
      Alan Stern authored
      This patch (as1285) rearranges the subroutines in usb-serial.c
      concerned with tty lifetimes into a more logical order: install, open,
      hangup, close, release.  It also updates the formatting of the
      kerneldoc comments.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      f5b0953a
    • Alan Stern's avatar
      usb-serial: change referencing of port and serial structures · 41bd34dd
      Alan Stern authored
      This patch (as1284) changes the referencing of the usb_serial and
      usb_serial_port structures in usb-serial.c.  It's not feasible to make
      the port structures keep a reference to the serial structure, because
      the ports need to remain in existence when serial is released -- quite
      a few of the drivers expect this.  Consequently taking a reference
      to the port when the device file is open is insufficient; such a
      reference would not pin serial.
      
      To fix this, we now take a reference to serial when the device file is
      opened.  The final put_device() for the ports occurs in
      destroy_serial(), so that the ports will last as long as they are
      needed.
      
      The patch initializes all the port devices, including those in the
      unused "fake" ports.  This makes the code more uniform because they
      can all be released in the same way.  The error handling code in
      usb_serial_probe() is much simplified by this approach; instead of
      freeing everything by hand we can use a single usb_serial_put() call.
      
      Also simplified is the port-release mechanism.  Instead of being two
      separate routines, port_release() and port_free() can be combined into
      one.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      41bd34dd
    • Jiri Slaby's avatar
      tty: Char: mxser, use THRE for ASPP_OQUEUE ioctl · a75b7b68
      Jiri Slaby authored
      In moxa specific ASPP_OQUEUE ioctl command, they apparently want
      only know whether there is space in transmitter hold register.
      
      So switch UART_LSR_TEMT to UART_LSR_THRE in that specific case
      according to the change in 1.14 moxa drivers.
      Signed-off-by: default avatarJiri Slaby <jirislaby@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      a75b7b68