]> Pileus Git - ~andy/linux/commit
Bluetooth: Move the tty initialization and cleanup out of open/close
authorGianluca Anzolin <gianluca@sottospazio.it>
Mon, 29 Jul 2013 15:08:10 +0000 (17:08 +0200)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Wed, 21 Aug 2013 14:47:06 +0000 (16:47 +0200)
commit54b926a1434e817ca84cb090f36b56763e192470
tree4ab276833fd667f8252925f14bb03dd61f5e1903
parentebe937f74b8a72cf3ceeae5c2194a160bb092901
Bluetooth: Move the tty initialization and cleanup out of open/close

Move the tty_struct initialization from rfcomm_tty_open() to
rfcomm_tty_install() and do the same for the cleanup moving the code from
rfcomm_tty_close() to rfcomm_tty_cleanup().

Add also extra error handling in rfcomm_tty_install() because, unlike
.open()/.close(), .cleanup() is not called if .install() fails.

Signed-off-by: Gianluca Anzolin <gianluca@sottospazio.it>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
net/bluetooth/rfcomm/tty.c