diff options
author | Johan Hovold <jhovold@gmail.com> | 2009-12-28 23:01:49 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-02 14:53:52 -0800 |
commit | 974fccb7aba8ca4ff887836e26c0ac4c99d041ca (patch) | |
tree | 7c538bb8b64236e0aa6ea38518bbdddc8a135cd6 /drivers/usb/serial/cypress_m8.c | |
parent | 0954644bf5a5a2281746516ce0f5df988d504c31 (diff) | |
download | blackbird-op-linux-974fccb7aba8ca4ff887836e26c0ac4c99d041ca.tar.gz blackbird-op-linux-974fccb7aba8ca4ff887836e26c0ac4c99d041ca.zip |
USB: cypress_m8: fix endianess bug
Cc: Lonnie Mendez <dignome@gmail.com>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/cypress_m8.c')
-rw-r--r-- | drivers/usb/serial/cypress_m8.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index 1ce1a3a3e21a..2457165304cb 100644 --- a/drivers/usb/serial/cypress_m8.c +++ b/drivers/usb/serial/cypress_m8.c @@ -376,7 +376,7 @@ static int cypress_serial_control(struct tty_struct *tty, __func__, new_baudrate); /* fill the feature_buffer with new configuration */ - *((u_int32_t *)feature_buffer) = new_baudrate; + *((u32 *)feature_buffer) = cpu_to_le32(new_baudrate); feature_buffer[4] |= data_bits; /* assign data bits in 2 bit space ( max 3 ) */ /* 1 bit gap */ feature_buffer[4] |= (stop_bits << 3); /* assign stop bits in 1 bit space */ @@ -453,7 +453,7 @@ static int cypress_serial_control(struct tty_struct *tty, /* store the config in one byte, and later use bit masks to check values */ priv->current_config = feature_buffer[4]; - priv->baud_rate = *((u_int32_t *)feature_buffer); + priv->baud_rate = le32_to_cpup((u32 *)feature_buffer); spin_unlock_irqrestore(&priv->lock, flags); } } |