• 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
usb-serial.c 36.9 KB