OSDN Git Service

USB: serial: usb_wwan: fix TIOCSSERIAL jiffies conversions
authorJohan Hovold <johan@kernel.org>
Wed, 7 Apr 2021 10:39:16 +0000 (12:39 +0200)
committerJohan Hovold <johan@kernel.org>
Thu, 8 Apr 2021 07:45:59 +0000 (09:45 +0200)
commit3d732690d2267f4d0e19077b178dffbedafdf0c9
tree3c7550b512b63fff75e7bef2ebdbd14bffbf93cd
parentd370c90dcd64e427a79a093a070117a1571d4cd8
USB: serial: usb_wwan: fix TIOCSSERIAL jiffies conversions

The port close_delay and closing_wait parameters set by TIOCSSERIAL are
specified in jiffies and not milliseconds.

Add the missing conversions so that the TIOCSSERIAL works as expected
also when HZ is not 1000.

Fixes: 02303f73373a ("usb-wwan: implement TIOCGSERIAL and TIOCSSERIAL to avoid blocking close(2)")
Cc: stable@vger.kernel.org # 2.6.38
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/usb_wwan.c