aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2009-12-28 17:01:47 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-02 17:53:51 -0500
commit52372ccb5a19d35b68b79118fafdced0c12f0ec9 (patch)
treec058c17b50457433a46a3814bb3e1cd44e7fd4a5 /drivers/usb
parentf2b5cc834b69d2999b749144481de9a94f01bc48 (diff)
USB: ch341: use le16_to_cpup to be explicit about endianess
Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/serial/ch341.c2
1 files changed, 1 insertions, 1 deletions
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)
422 } 422 }
423 dbg("%s - New ch341 break register contents - reg1: %x, reg2: %x", 423 dbg("%s - New ch341 break register contents - reg1: %x, reg2: %x",
424 __func__, break_reg[0], break_reg[1]); 424 __func__, break_reg[0], break_reg[1]);
425 reg_contents = (uint16_t)break_reg[0] | ((uint16_t)break_reg[1] << 8); 425 reg_contents = le16_to_cpup((uint16_t *)break_reg);
426 r = ch341_control_out(port->serial->dev, CH341_REQ_WRITE_REG, 426 r = ch341_control_out(port->serial->dev, CH341_REQ_WRITE_REG,
427 ch341_break_reg, reg_contents); 427 ch341_break_reg, reg_contents);
428 if (r < 0) 428 if (r < 0)