diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2008-04-28 02:00:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 13:03:31 -0400 |
commit | fd05e720099e8eeddb378305d1a41c1445344b91 (patch) | |
tree | d617918be290b47b35822bc3cf21c8f01dde5dd2 /drivers/usb/serial/oti6858.c | |
parent | 01d7b369887b6feb7c9ce2b20988fafe3f70841c (diff) |
drivers/usb annotations and fixes
* endianness annotations
* endianness fixes
* missing get_unaligned/put_unaligned
It's pretty much all over the place, changes to different files are independent.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Serial-parts-Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/usb/serial/oti6858.c')
-rw-r--r-- | drivers/usb/serial/oti6858.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c index d92bb6501c84..a9625c180dc3 100644 --- a/drivers/usb/serial/oti6858.c +++ b/drivers/usb/serial/oti6858.c | |||
@@ -98,7 +98,7 @@ struct oti6858_buf { | |||
98 | 98 | ||
99 | /* format of the control packet */ | 99 | /* format of the control packet */ |
100 | struct oti6858_control_pkt { | 100 | struct oti6858_control_pkt { |
101 | u16 divisor; /* baud rate = 96000000 / (16 * divisor), LE */ | 101 | __le16 divisor; /* baud rate = 96000000 / (16 * divisor), LE */ |
102 | #define OTI6858_MAX_BAUD_RATE 3000000 | 102 | #define OTI6858_MAX_BAUD_RATE 3000000 |
103 | u8 frame_fmt; | 103 | u8 frame_fmt; |
104 | #define FMT_STOP_BITS_MASK 0xc0 | 104 | #define FMT_STOP_BITS_MASK 0xc0 |
@@ -211,7 +211,7 @@ struct oti6858_private { | |||
211 | struct delayed_work delayed_write_work; | 211 | struct delayed_work delayed_write_work; |
212 | 212 | ||
213 | struct { | 213 | struct { |
214 | u16 divisor; | 214 | __le16 divisor; |
215 | u8 frame_fmt; | 215 | u8 frame_fmt; |
216 | u8 control; | 216 | u8 control; |
217 | } pending_setup; | 217 | } pending_setup; |
@@ -450,7 +450,7 @@ static void oti6858_set_termios(struct usb_serial_port *port, | |||
450 | unsigned long flags; | 450 | unsigned long flags; |
451 | unsigned int cflag; | 451 | unsigned int cflag; |
452 | u8 frame_fmt, control; | 452 | u8 frame_fmt, control; |
453 | u16 divisor; | 453 | __le16 divisor; |
454 | int br; | 454 | int br; |
455 | 455 | ||
456 | dbg("%s(port = %d)", __func__, port->number); | 456 | dbg("%s(port = %d)", __func__, port->number); |
@@ -505,11 +505,12 @@ static void oti6858_set_termios(struct usb_serial_port *port, | |||
505 | divisor = 0; | 505 | divisor = 0; |
506 | } else { | 506 | } else { |
507 | int real_br; | 507 | int real_br; |
508 | int new_divisor; | ||
508 | br = min(br, OTI6858_MAX_BAUD_RATE); | 509 | br = min(br, OTI6858_MAX_BAUD_RATE); |
509 | 510 | ||
510 | divisor = (96000000 + 8 * br) / (16 * br); | 511 | new_divisor = (96000000 + 8 * br) / (16 * br); |
511 | real_br = 96000000 / (16 * divisor); | 512 | real_br = 96000000 / (16 * new_divisor); |
512 | divisor = cpu_to_le16(divisor); | 513 | divisor = cpu_to_le16(new_divisor); |
513 | tty_encode_baud_rate(port->tty, real_br, real_br); | 514 | tty_encode_baud_rate(port->tty, real_br, real_br); |
514 | } | 515 | } |
515 | 516 | ||