USB: serial: mos7720: fix parallel probe
authorJohan Hovold <johan@kernel.org>
Tue, 3 Jan 2017 15:39:53 +0000 (16:39 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 7 Jun 2017 22:46:52 +0000 (00:46 +0200)
commit56a4835e8e26673f33217b99efa0b8f0dea15d07
tree452f68dba992e740a62525bd3650857a2cbff4ed
parent756f54d85f37d808d4f5d36f5dce559d11d2b06c
USB: serial: mos7720: fix parallel probe

commit fde1faf872ed86d88e245191bc15a8e57368cd1c upstream.

A static usb-serial-driver structure that is used to initialise the
interrupt URB was modified during probe depending on the currently
probed device type, something which could break a parallel probe of a
device of a different type.

Fix this up by overriding the default completion callback for MCS7715
devices in attach() instead. We may want to use two usb-serial driver
instances for the two types later.

Fixes: fb088e335d78 ("USB: serial: add support for serial port on the moschip 7715")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/usb/serial/mos7720.c