• Alan Stern's avatar
    usb-serial: acquire references when a new tty is installed · 11f4140f
    Alan Stern authored
    commit cc56cd01 upstream.
    
    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>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    11f4140f
usb-serial.c 37 KB