diff options
Diffstat (limited to 'drivers')
-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, | |||
376 | __func__, new_baudrate); | 376 | __func__, new_baudrate); |
377 | 377 | ||
378 | /* fill the feature_buffer with new configuration */ | 378 | /* fill the feature_buffer with new configuration */ |
379 | *((u_int32_t *)feature_buffer) = new_baudrate; | 379 | *((u32 *)feature_buffer) = cpu_to_le32(new_baudrate); |
380 | feature_buffer[4] |= data_bits; /* assign data bits in 2 bit space ( max 3 ) */ | 380 | feature_buffer[4] |= data_bits; /* assign data bits in 2 bit space ( max 3 ) */ |
381 | /* 1 bit gap */ | 381 | /* 1 bit gap */ |
382 | feature_buffer[4] |= (stop_bits << 3); /* assign stop bits in 1 bit space */ | 382 | 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, | |||
453 | /* store the config in one byte, and later | 453 | /* store the config in one byte, and later |
454 | use bit masks to check values */ | 454 | use bit masks to check values */ |
455 | priv->current_config = feature_buffer[4]; | 455 | priv->current_config = feature_buffer[4]; |
456 | priv->baud_rate = *((u_int32_t *)feature_buffer); | 456 | priv->baud_rate = le32_to_cpup((u32 *)feature_buffer); |
457 | spin_unlock_irqrestore(&priv->lock, flags); | 457 | spin_unlock_irqrestore(&priv->lock, flags); |
458 | } | 458 | } |
459 | } | 459 | } |