X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fserial%2Fsunsu.c;h=2a63cdba32083eae3984578722ba7159fc58eb06;hb=4750def52cb2c21732dda9aa1d43a07db37b0186;hp=564592b2b2ba26c32d10f49a34a799554295029d;hpb=741441ab7800f1eb031e74fd720f4f8f361678ed;p=powerpc.git diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c index 564592b2b2..2a63cdba32 100644 --- a/drivers/serial/sunsu.c +++ b/drivers/serial/sunsu.c @@ -17,7 +17,6 @@ #include #include -#include #include #include #include @@ -1313,7 +1312,7 @@ static void sunsu_console_write(struct console *co, const char *s, * - initialize the serial port * Return non-zero if we didn't find a serial port. */ -static int sunsu_console_setup(struct console *co, char *options) +static int __init sunsu_console_setup(struct console *co, char *options) { struct uart_port *port; int baud = 9600; @@ -1344,7 +1343,7 @@ static int sunsu_console_setup(struct console *co, char *options) return uart_set_options(port, co, baud, parity, bits, flow); } -static struct console sunsu_cons = { +static struct console sunsu_console = { .name = "ttyS", .write = sunsu_console_write, .device = uart_console_device, @@ -1374,9 +1373,9 @@ static inline struct console *SUNSU_CONSOLE(int num_uart) if (i == num_uart) return NULL; - sunsu_cons.index = i; + sunsu_console.index = i; - return &sunsu_cons; + return &sunsu_console; } #else #define SUNSU_CONSOLE(num_uart) (NULL) @@ -1388,8 +1387,8 @@ static enum su_type __devinit su_get_type(struct device_node *dp) struct device_node *ap = of_find_node_by_path("/aliases"); if (ap) { - char *keyb = of_get_property(ap, "keyboard", NULL); - char *ms = of_get_property(ap, "mouse", NULL); + const char *keyb = of_get_property(ap, "keyboard", NULL); + const char *ms = of_get_property(ap, "mouse", NULL); if (keyb) { if (dp == of_find_node_by_path(keyb)) @@ -1480,13 +1479,13 @@ static int __devinit su_probe(struct of_device *op, const struct of_device_id *m return 0; out_unmap: - of_iounmap(up->port.membase, up->reg_size); + of_iounmap(&op->resource[0], up->port.membase, up->reg_size); return err; } -static int __devexit su_remove(struct of_device *dev) +static int __devexit su_remove(struct of_device *op) { - struct uart_sunsu_port *up = dev_get_drvdata(&dev->dev);; + struct uart_sunsu_port *up = dev_get_drvdata(&op->dev); if (up->su_type == SU_PORT_MS || up->su_type == SU_PORT_KBD) { @@ -1499,9 +1498,9 @@ static int __devexit su_remove(struct of_device *dev) } if (up->port.membase) - of_iounmap(up->port.membase, up->reg_size); + of_iounmap(&op->resource[0], up->port.membase, up->reg_size); - dev_set_drvdata(&dev->dev, NULL); + dev_set_drvdata(&op->dev, NULL); return 0; }