1. 23 Sep, 2009 10 commits
  2. 20 Sep, 2009 21 commits
  3. 19 Sep, 2009 9 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