]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
USB: serial: ch341: use fix-width types consistently
authorJohan Hovold <johan@kernel.org>
Wed, 8 Jan 2025 10:15:18 +0000 (11:15 +0100)
committerJohan Hovold <johan@kernel.org>
Wed, 8 Jan 2025 12:46:55 +0000 (13:46 +0100)
Use Linux fix-width types consistently and drop a related unnecessary
cast.

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

index ac74b353b26d34b1fa1deab188163b543e48605e..7cc36f84821ff473b97e8f8efc437019b715931d 100644 (file)
@@ -660,13 +660,12 @@ restore:
 
 static int ch341_break_ctl(struct tty_struct *tty, int break_state)
 {
-       const uint16_t ch341_break_reg =
-                       ((uint16_t) CH341_REG_LCR << 8) | CH341_REG_BREAK;
+       const u16 ch341_break_reg = (CH341_REG_LCR << 8) | CH341_REG_BREAK;
        struct usb_serial_port *port = tty->driver_data;
        struct ch341_private *priv = usb_get_serial_port_data(port);
+       u16 reg_contents;
+       u8 break_reg[2];
        int r;
-       uint16_t reg_contents;
-       uint8_t break_reg[2];
 
        if (priv->quirks & CH341_QUIRK_SIMULATE_BREAK)
                return ch341_simulate_break(tty, break_state);