Re: [PATCH 2/3] USB: serial: mct_u232: fix big-endian baud-rate handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 11 May 2017 11:41:20 +0200
Johan Hovold <johan@xxxxxxxxxx> wrote:

> Drop erroneous cpu_to_le32 when setting the baud rate, something which
> corrupted the divisor on big-endian hosts.

> +++ b/drivers/usb/serial/mct_u232.c
> @@ -189,7 +189,7 @@ static int mct_u232_set_baud_rate(struct tty_struct *tty,
>  	divisor = mct_u232_calculate_baud_rate(serial, value, &speed);
> -	put_unaligned_le32(cpu_to_le32(divisor), buf);
> +	put_unaligned_le32(divisor, buf);
>  	rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),

Acked-By: Pete Zaitcev <zaitcev@xxxxxxxxx>

-- Pete



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]