From 52372ccb5a19d35b68b79118fafdced0c12f0ec9 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Mon, 28 Dec 2009 23:01:47 +0100 Subject: [PATCH] USB: ch341: use le16_to_cpup to be explicit about endianess Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/ch341.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c index 2942c6d381d0..4fd01d6b7157 100644 --- a/drivers/usb/serial/ch341.c +++ b/drivers/usb/serial/ch341.c @@ -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)