TTY: call tty_port_destroy in the rest of drivers
authorJiri Slaby <jslaby@suse.cz>
Thu, 15 Nov 2012 08:49:56 +0000 (09:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Nov 2012 01:20:58 +0000 (17:20 -0800)
commit191c5f10275cfbb36802edadbdb10c73537327b4
tree93e6f0d57cb1295fb7c461dbe5ecefafeb4ad15a
parentd0f59141ca40159c9d142c0f62e9aea61f846539
TTY: call tty_port_destroy in the rest of drivers

After commit "TTY: move tty buffers to tty_port", the tty buffers are
not freed in some drivers. This is because tty_port_destructor is not
called whenever a tty_port is freed. This was an assumption I counted
with but was unfortunately untrue. So fix the drivers to fulfil this
assumption.

To be sure, the TTY buffers (and later some stuff) are gone along with
the tty_port, we have to call tty_port_destroy at tear-down places.
This is mostly where the structure containing a tty_port is freed.
This patch does exactly that -- put tty_port_destroy at those places.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
41 files changed:
arch/alpha/kernel/srmcons.c
arch/ia64/hp/sim/simserial.c
arch/m68k/emu/nfcon.c
arch/parisc/kernel/pdc_cons.c
arch/um/drivers/line.c
arch/xtensa/platforms/iss/console.c
drivers/char/pcmcia/synclink_cs.c
drivers/char/ttyprintk.c
drivers/isdn/gigaset/common.c
drivers/isdn/i4l/isdn_tty.c
drivers/misc/pti.c
drivers/net/usb/hso.c
drivers/s390/char/con3215.c
drivers/s390/char/sclp_tty.c
drivers/s390/char/sclp_vt220.c
drivers/s390/char/tty3270.c
drivers/staging/ccg/u_serial.c
drivers/staging/dgrp/dgrp_specproc.c
drivers/staging/dgrp/dgrp_tty.c
drivers/staging/ipack/devices/ipoctal.c
drivers/tty/amiserial.c
drivers/tty/bfin_jtag_comm.c
drivers/tty/cyclades.c
drivers/tty/ehv_bytechan.c
drivers/tty/hvc/hvsi.c
drivers/tty/ipwireless/tty.c
drivers/tty/moxa.c
drivers/tty/mxser.c
drivers/tty/nozomi.c
drivers/tty/rocket.c
drivers/tty/serial/68328serial.c
drivers/tty/serial/ifx6x60.c
drivers/tty/serial/kgdb_nmi.c
drivers/tty/serial/serial_core.c
drivers/tty/synclink.c
drivers/tty/synclink_gt.c
drivers/tty/synclinkmp.c
drivers/tty/vt/vt.c
drivers/usb/gadget/u_serial.c
drivers/usb/serial/usb-serial.c
net/irda/ircomm/ircomm_tty.c