diff options
author | Johan Hovold <jhovold@gmail.com> | 2009-12-31 18:48:01 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-03 01:54:00 +0300 |
commit | 0f2c2d7bbb51338fdcda9670795a6c6e348622d9 (patch) | |
tree | 320646ba416107e16d9640a7bdf92ce5261d9f21 /drivers/usb/serial | |
parent | 5be796f0b842c5852d7397a82f8ebd6be8451872 (diff) | |
download | linux-0f2c2d7bbb51338fdcda9670795a6c6e348622d9.tar.xz |
USB: cypress_m8: use put_unaligned_le32() where necessary
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')
-rw-r--r-- | drivers/usb/serial/cypress_m8.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index 2457165304cb..b19e16a539e2 100644 --- a/drivers/usb/serial/cypress_m8.c +++ b/drivers/usb/serial/cypress_m8.c @@ -66,6 +66,7 @@ #include <linux/serial.h> #include <linux/delay.h> #include <linux/uaccess.h> +#include <asm/unaligned.h> #include "cypress_m8.h" @@ -376,7 +377,7 @@ static int cypress_serial_control(struct tty_struct *tty, __func__, new_baudrate); /* fill the feature_buffer with new configuration */ - *((u32 *)feature_buffer) = cpu_to_le32(new_baudrate); + put_unaligned_le32(new_baudrate, feature_buffer); 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 +454,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 = le32_to_cpup((u32 *)feature_buffer); + priv->baud_rate = get_unaligned_le32(feature_buffer); spin_unlock_irqrestore(&priv->lock, flags); } } |