Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 151197
b: refs/heads/master
c: 1a2c4b3
h: refs/heads/master
i:
  151195: ef50270
v: v3
  • Loading branch information
Sascha Hauer authored and Linus Torvalds committed Jun 16, 2009
1 parent 6497367 commit a2ade16
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0ccad87012c6c2e7446e4dc0f0894cf182a5270a
refs/heads/master: 1a2c4b3147ac0645605d6def2855478861d9361b
12 changes: 7 additions & 5 deletions trunk/drivers/serial/imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -924,11 +924,13 @@ imx_set_termios(struct uart_port *port, struct ktermios *termios,
rational_best_approximation(16 * div * baud, sport->port.uartclk,
1 << 16, 1 << 16, &num, &denom);

tdiv64 = sport->port.uartclk;
tdiv64 *= num;
do_div(tdiv64, denom * 16 * div);
tty_encode_baud_rate(sport->port.info->port.tty,
(speed_t)tdiv64, (speed_t)tdiv64);
if (port->info && port->info->port.tty) {
tdiv64 = sport->port.uartclk;
tdiv64 *= num;
do_div(tdiv64, denom * 16 * div);
tty_encode_baud_rate(sport->port.info->port.tty,
(speed_t)tdiv64, (speed_t)tdiv64);
}

num -= 1;
denom -= 1;
Expand Down

0 comments on commit a2ade16

Please sign in to comment.