From: Johan Hovold Date: Thu, 31 Dec 2009 15:47:59 +0000 (+0100) Subject: USB: ch341: use get_unaligned_le16 in break_ctl X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5be796f0b842c5852d7397a82f8ebd6be8451872;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git USB: ch341: use get_unaligned_le16 in break_ctl Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- 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 @@ #include #include #include +#include #define DEFAULT_BAUD_RATE 9600 #define DEFAULT_TIMEOUT 1000 @@ -422,7 +423,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 = le16_to_cpup((uint16_t *)break_reg); + reg_contents = get_unaligned_le16(break_reg); r = ch341_control_out(port->serial->dev, CH341_REQ_WRITE_REG, ch341_break_reg, reg_contents); if (r < 0)