aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/udbg_16550.c
diff options
context:
space:
mode:
authorKumar Gala <galak@gate.crashing.org>2005-12-20 17:16:26 -0500
committerPaul Mackerras <paulus@samba.org>2006-01-08 23:33:42 -0500
commitd0e132b536b6c8044991932d0c160676c46c98e5 (patch)
tree7bbf87c14929a93952992c0d13326b20ea69f3e7 /arch/powerpc/kernel/udbg_16550.c
parentb226e462124522f2f23153daff31c311729dfa2f (diff)
[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>
Diffstat (limited to 'arch/powerpc/kernel/udbg_16550.c')
-rw-r--r--arch/powerpc/kernel/udbg_16550.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c
index e58c048a7b19..7541bf44d2da 100644
--- a/arch/powerpc/kernel/udbg_16550.c
+++ b/arch/powerpc/kernel/udbg_16550.c
@@ -137,7 +137,7 @@ unsigned int udbg_probe_uart_speed(void __iomem *comport, unsigned int clock)
137 speed = (clock / prescaler) / (divisor * 16); 137 speed = (clock / prescaler) / (divisor * 16);
138 138
139 /* sanity check */ 139 /* sanity check */
140 if (speed < 9600 || speed > 115200) 140 if (speed < 0 || speed > (clock / 16))
141 speed = 9600; 141 speed = 9600;
142 142
143 return speed; 143 return speed;