]> git.baikalelectronics.ru Git - kernel.git/commit
USB: iowarrior: drop redundant disconnect mutex
authorJohan Hovold <johan@kernel.org>
Wed, 9 Oct 2019 10:48:44 +0000 (12:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Oct 2019 10:45:06 +0000 (12:45 +0200)
commit2f936b5bd9df06ba18a269be29c4202b169d7760
treecf70ffb402c783466d0a1dfb96409e8e887bca77
parent5a1d3e95fb50b309885bb391f97bbd3a71cfbe79
USB: iowarrior: 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
9ca93873540e ("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/20191009104846.5925-5-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/iowarrior.c