diff options
author | Johan Hovold <johan@kernel.org> | 2021-03-11 19:14:49 +0300 |
---|---|---|
committer | Johan Hovold <johan@kernel.org> | 2021-03-17 11:16:25 +0300 |
commit | ca82f648d6d4f5cb21717d250bb08aa6b0bce660 (patch) | |
tree | c1f13dd5f466c7d5f5aa83d7df07e6e424dcddac | |
parent | 8a7bf7510d1f43994b39a677e561af4ee6a1a0ae (diff) | |
download | linux-ca82f648d6d4f5cb21717d250bb08aa6b0bce660.tar.xz |
USB: serial: pl2303: rename legacy PL2303H type
Rename the legacy type which is supposedly a PL2303H which came in two
variants (and which we handle the same way).
Signed-off-by: Johan Hovold <johan@kernel.org>
-rw-r--r-- | drivers/usb/serial/pl2303.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 42dcc3cfb449..cd2acd8c5246 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c @@ -173,7 +173,7 @@ MODULE_DEVICE_TABLE(usb, id_table); static void pl2303_set_break(struct usb_serial_port *port, bool enable); enum pl2303_type { - TYPE_01, /* Type 0 and 1 (difference unknown) */ + TYPE_H, TYPE_HX, TYPE_TA, TYPE_TB, @@ -203,7 +203,7 @@ struct pl2303_private { }; static const struct pl2303_type_data pl2303_type_data[TYPE_COUNT] = { - [TYPE_01] = { + [TYPE_H] = { .max_baud_rate = 1228800, .quirks = PL2303_QUIRK_LEGACY, .no_autoxonxoff = true, @@ -382,16 +382,16 @@ static int pl2303_detect_type(struct usb_serial *serial) u8 buf; /* - * Legacy types 0 and 1, difference unknown. + * Legacy PL2303H, variants 0 and 1 (difference unknown). */ if (desc->bDeviceClass == 0x02) - return TYPE_01; /* type 0 */ + return TYPE_H; /* variant 0 */ if (desc->bMaxPacketSize0 != 0x40) { if (desc->bDeviceClass == 0x00 || desc->bDeviceClass == 0xff) - return TYPE_01; /* type 1 */ + return TYPE_H; /* variant 1 */ - return TYPE_01; /* type 0 */ + return TYPE_H; /* variant 0 */ } /* |