OSDN Git Service

USB: serial: mos7720: fix parallel probe
authorJohan Hovold <johan@kernel.org>
Tue, 3 Jan 2017 15:39:53 +0000 (16:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2017 10:22:46 +0000 (11:22 +0100)
commit3e3f05182b392403e40dae086e0a9903557a5fc9
tree806db0b0d4904405f912b146b73a5638c7c5940f
parent5c83e07c3c8b1c8763c4e575fc109e70b1ecc5f7
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/mos7720.c