USB: serial: opticon: fix CTS retrieval at open
authorJohan Hovold <johan@kernel.org>
Fri, 13 Jan 2017 12:21:08 +0000 (13:21 +0100)
committerJohan Hovold <johan@kernel.org>
Mon, 16 Jan 2017 15:42:21 +0000 (16:42 +0100)
commit2eee05020a0e7ee7c04422cbacdb07859e45dce6
tree1c999c9d819117e07b736cb88c834feea0f1a03d
parent39712e8bfa8d3aa6ce1e60fc9d62c9b076c17a30
USB: serial: opticon: fix CTS retrieval at open

The opticon driver used a control request at open to trigger a CTS
status notification to be sent over the bulk-in pipe. When the driver
was converted to using the generic read implementation, an inverted test
prevented this request from being sent, something which could lead to
TIOCMGET reporting an incorrect CTS state.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 7a6ee2b02751 ("USB: opticon: switch to generic read
implementation")
Cc: stable <stable@vger.kernel.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/opticon.c