diff options
author | Johan Hovold <jhovold@gmail.com> | 2013-12-29 13:23:06 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-01-03 15:31:47 -0500 |
commit | f84ee3b2f5e5e39041c39268a9eab5046a050d44 (patch) | |
tree | bdc84872acb2cdebdc2471881cdb563fefc6d260 /drivers/usb/serial | |
parent | 228e4105374cffd5372b1dbdf1f8ec8cf1d964ae (diff) |
USB: pl2303: use speed_t for baud rates
Use speed_t for baud rates throughout.
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r-- | drivers/usb/serial/pl2303.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 8dd1c4a0aefd..40f7b80b3601 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c | |||
@@ -301,14 +301,14 @@ static void pl2303_encode_baudrate(struct tty_struct *tty, | |||
301 | struct usb_serial_port *port, | 301 | struct usb_serial_port *port, |
302 | u8 buf[4]) | 302 | u8 buf[4]) |
303 | { | 303 | { |
304 | const int baud_sup[] = { 75, 150, 300, 600, 1200, 1800, 2400, 3600, | 304 | const speed_t baud_sup[] = { 75, 150, 300, 600, 1200, 1800, 2400, 3600, |
305 | 4800, 7200, 9600, 14400, 19200, 28800, 38400, | 305 | 4800, 7200, 9600, 14400, 19200, 28800, 38400, |
306 | 57600, 115200, 230400, 460800, 500000, 614400, | 306 | 57600, 115200, 230400, 460800, 500000, 614400, |
307 | 921600, 1228800, 2457600, 3000000, 6000000 }; | 307 | 921600, 1228800, 2457600, 3000000, 6000000 }; |
308 | 308 | ||
309 | struct usb_serial *serial = port->serial; | 309 | struct usb_serial *serial = port->serial; |
310 | struct pl2303_serial_private *spriv = usb_get_serial_data(serial); | 310 | struct pl2303_serial_private *spriv = usb_get_serial_data(serial); |
311 | int baud; | 311 | speed_t baud; |
312 | int i; | 312 | int i; |
313 | 313 | ||
314 | /* | 314 | /* |
@@ -317,7 +317,7 @@ static void pl2303_encode_baudrate(struct tty_struct *tty, | |||
317 | * 9600 baud (at least my PL2303X always does) | 317 | * 9600 baud (at least my PL2303X always does) |
318 | */ | 318 | */ |
319 | baud = tty_get_baud_rate(tty); | 319 | baud = tty_get_baud_rate(tty); |
320 | dev_dbg(&port->dev, "baud requested = %d\n", baud); | 320 | dev_dbg(&port->dev, "baud requested = %u\n", baud); |
321 | if (!baud) | 321 | if (!baud) |
322 | return; | 322 | return; |
323 | 323 | ||
@@ -336,7 +336,7 @@ static void pl2303_encode_baudrate(struct tty_struct *tty, | |||
336 | 336 | ||
337 | /* type_0, type_1 only support up to 1228800 baud */ | 337 | /* type_0, type_1 only support up to 1228800 baud */ |
338 | if (spriv->type != HX) | 338 | if (spriv->type != HX) |
339 | baud = min_t(int, baud, 1228800); | 339 | baud = min_t(speed_t, baud, 1228800); |
340 | 340 | ||
341 | if (baud <= 115200) { | 341 | if (baud <= 115200) { |
342 | put_unaligned_le32(baud, buf); | 342 | put_unaligned_le32(baud, buf); |
@@ -358,7 +358,7 @@ static void pl2303_encode_baudrate(struct tty_struct *tty, | |||
358 | 358 | ||
359 | /* Save resulting baud rate */ | 359 | /* Save resulting baud rate */ |
360 | tty_encode_baud_rate(tty, baud, baud); | 360 | tty_encode_baud_rate(tty, baud, baud); |
361 | dev_dbg(&port->dev, "baud set = %d\n", baud); | 361 | dev_dbg(&port->dev, "baud set = %u\n", baud); |
362 | } | 362 | } |
363 | 363 | ||
364 | static int pl2303_get_line_request(struct usb_serial_port *port, | 364 | static int pl2303_get_line_request(struct usb_serial_port *port, |