dect
/
linux-2.6
Archived
13
0
Fork 0

[PATCH] powerpc: Loosen udbg_probe_uart_speed sanity checking

The checking of the baudrate in udbg_probe_uart_speed was
too tight and would cause reporting back of the default
baud rate in cases where the computed speed was valid.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
Kumar Gala 2005-12-20 16:16:26 -06:00 committed by Paul Mackerras
parent b226e46212
commit d0e132b536
1 changed files with 1 additions and 1 deletions

View File

@ -137,7 +137,7 @@ unsigned int udbg_probe_uart_speed(void __iomem *comport, unsigned int clock)
speed = (clock / prescaler) / (divisor * 16);
/* sanity check */
if (speed < 9600 || speed > 115200)
if (speed < 0 || speed > (clock / 16))
speed = 9600;
return speed;