USB: mos7840: fix device-type detection
authorJohan Hovold <jhovold@gmail.com>
Fri, 26 Jul 2013 09:55:18 +0000 (11:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jul 2013 21:14:09 +0000 (14:14 -0700)
commit40c24f2893ba0ba7df485871f6aac0c197ceef5b
tree78cfddeb2394b1a61988e85ed592f3497d9f8b54
parentd8a083cc746664916d9d36ed9e4d08a29525f245
USB: mos7840: fix device-type detection

Fix race in device-type detection introduced by commit 0eafe4de ("USB:
serial: mos7840: add support for MCS7810 devices") which used a static
variable to hold the device type.

Move type detection to probe and use serial data to store the device
type.

Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/mos7840.c