aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/ch341.c
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2009-12-31 10:47:59 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-02 17:54:00 -0500
commit5be796f0b842c5852d7397a82f8ebd6be8451872 (patch)
tree86c317dbd9a83d49a127ef72def0ce8eaa3ae484 /drivers/usb/serial/ch341.c
parentd0ef90b49857b403c1cfa62fce229c967dd4be40 (diff)
USB: ch341: use get_unaligned_le16 in break_ctl
Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/ch341.c')
-rw-r--r--drivers/usb/serial/ch341.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c
index 4fd01d6b7157..6230d24894ff 100644
--- a/drivers/usb/serial/ch341.c
+++ b/drivers/usb/serial/ch341.c
@@ -22,6 +22,7 @@
22#include <linux/usb.h> 22#include <linux/usb.h>
23#include <linux/usb/serial.h> 23#include <linux/usb/serial.h>
24#include <linux/serial.h> 24#include <linux/serial.h>
25#include <asm/unaligned.h>
25 26
26#define DEFAULT_BAUD_RATE 9600 27#define DEFAULT_BAUD_RATE 9600
27#define DEFAULT_TIMEOUT 1000 28#define DEFAULT_TIMEOUT 1000
@@ -422,7 +423,7 @@ static void ch341_break_ctl(struct tty_struct *tty, int break_state)
422 } 423 }
423 dbg("%s - New ch341 break register contents - reg1: %x, reg2: %x", 424 dbg("%s - New ch341 break register contents - reg1: %x, reg2: %x",
424 __func__, break_reg[0], break_reg[1]); 425 __func__, break_reg[0], break_reg[1]);
425 reg_contents = le16_to_cpup((uint16_t *)break_reg); 426 reg_contents = get_unaligned_le16(break_reg);
426 r = ch341_control_out(port->serial->dev, CH341_REQ_WRITE_REG, 427 r = ch341_control_out(port->serial->dev, CH341_REQ_WRITE_REG,
427 ch341_break_reg, reg_contents); 428 ch341_break_reg, reg_contents);
428 if (r < 0) 429 if (r < 0)