USB: cdc-acm: only raise DTR on transitions from B0
authorJohan Hovold <johan@kernel.org>
Wed, 5 Nov 2014 17:41:59 +0000 (18:41 +0100)
committerZefan Li <lizefan@huawei.com>
Mon, 2 Feb 2015 09:05:14 +0000 (17:05 +0800)
commitc85f70407eaf925cdea7050a02bb30637ad8a155
treef3379f3d1084d5746b05993ca74db3a12464474d
parentadea30f0a90aa958594ca553e920a96f7a0b5b22
USB: cdc-acm: only raise DTR on transitions from B0

commit 4473d054ceb572557954f9536731d39b20937b0c upstream.

Make sure to only raise DTR on transitions from B0 in set_termios.

Also allow set_termios to be called from open with a termios_old of
NULL. Note that DTR will not be raised prematurely in this case.

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Zefan Li <lizefan@huawei.com>
drivers/usb/class/cdc-acm.c