Remove obsolete #include <linux/config.h>
[sfrench/cifs-2.6.git] / arch / powerpc / kernel / udbg_16550.c
index 50fd376446c9d091f7dfcfd3278db490bef42c0b..0835b4841dea41d8157fde5a7faa37f68a7aab12 100644 (file)
@@ -8,7 +8,6 @@
  *      as published by the Free Software Foundation; either version
  *      2 of the License, or (at your option) any later version.
  */
-#include <linux/config.h>
 #include <linux/types.h>
 #include <asm/udbg.h>
 #include <asm/io.h>
@@ -47,7 +46,7 @@ struct NS16550 {
 
 static volatile struct NS16550 __iomem *udbg_comport;
 
-static void udbg_550_putc(unsigned char c)
+static void udbg_550_putc(char c)
 {
        if (udbg_comport) {
                while ((in_8(&udbg_comport->lsr) & LSR_THRE) == 0)
@@ -69,14 +68,14 @@ static int udbg_550_getc_poll(void)
        return -1;
 }
 
-static unsigned char udbg_550_getc(void)
+static int udbg_550_getc(void)
 {
        if (udbg_comport) {
                while ((in_8(&udbg_comport->lsr) & LSR_DR) == 0)
                        /* wait for char */;
                return in_8(&udbg_comport->rbr);
        }
-       return 0;
+       return -1;
 }
 
 void udbg_init_uart(void __iomem *comport, unsigned int speed,
@@ -137,14 +136,14 @@ 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;
 }
 
 #ifdef CONFIG_PPC_MAPLE
-void udbg_maple_real_putc(unsigned char c)
+void udbg_maple_real_putc(char c)
 {
        if (udbg_comport) {
                while ((real_readb(&udbg_comport->lsr) & LSR_THRE) == 0)
@@ -155,7 +154,7 @@ void udbg_maple_real_putc(unsigned char c)
        }
 }
 
-void udbg_init_maple_realmode(void)
+void __init udbg_init_maple_realmode(void)
 {
        udbg_comport = (volatile struct NS16550 __iomem *)0xf40003f8;