Skip to content

Commit

Permalink
USB: ch341: use le16_to_cpup to be explicit about endianess
Browse files Browse the repository at this point in the history
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Mar 2, 2010
1 parent f2b5cc8 commit 52372cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/serial/ch341.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ static void ch341_break_ctl(struct tty_struct *tty, int break_state)
}
dbg("%s - New ch341 break register contents - reg1: %x, reg2: %x",
__func__, break_reg[0], break_reg[1]);
reg_contents = (uint16_t)break_reg[0] | ((uint16_t)break_reg[1] << 8);
reg_contents = le16_to_cpup((uint16_t *)break_reg);
r = ch341_control_out(port->serial->dev, CH341_REQ_WRITE_REG,
ch341_break_reg, reg_contents);
if (r < 0)
Expand Down

0 comments on commit 52372cc

Please sign in to comment.