USB: serial: mos7840: clean up device-type handling
authorJohan Hovold <johan@kernel.org>
Thu, 7 Nov 2019 13:28:54 +0000 (14:28 +0100)
committerJohan Hovold <johan@kernel.org>
Tue, 12 Nov 2019 08:56:20 +0000 (09:56 +0100)
commit375cb533c00a237264cc1d810d22f70de30362c2
tree2bcede75b647dd55679bbe8a535345d647474d15
parent92fe35fb9c70a00d8fbbf5bd6172c921dd9c7815
USB: serial: mos7840: clean up device-type handling

The current device-type detection is fragile and can't really be relied
upon. Instead of sprinkling device-id conditionals throughout the
driver, let's use the device-id table to encode the number of ports and
whether the device has a driver-controlled activity LED (MCS7810).

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/mos7840.c