USB: usblcd: drop redundant disconnect mutex
authorJohan Hovold <johan@kernel.org>
Thu, 26 Sep 2019 09:12:26 +0000 (11:12 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2019 09:11:08 +0000 (11:11 +0200)
commit61991d02fd33698182460bf62dca1b8162e3472b
tree5c551a8b84db17f84e961740a5cb4ad513786167
parenteb7f5a490c5edfe8126f64bc58b9ba2edef0a425
USB: usblcd: drop redundant disconnect mutex

Drop the redundant disconnect mutex which was introduced after the
open-disconnect race had been addressed generally in USB core by commit
d4ead16f50f9 ("USB: prevent char device open/deregister race").

Specifically, the rw-semaphore in core guarantees that all calls to
open() will have completed and that no new calls to open() will occur
after usb_deregister_dev() returns. Hence there is no need use the
driver data as an inverted disconnected flag.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20190926091228.24634-8-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/usblcd.c