Commit e895faed authored by Russell King's avatar Russell King

[SERIAL] serial_cs: Convert to use serial8250_{un,}register_port.

parent 33b42bcb
...@@ -40,8 +40,6 @@ ...@@ -40,8 +40,6 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/timer.h> #include <linux/timer.h>
#include <linux/tty.h>
#include <linux/serial.h>
#include <linux/serial_core.h> #include <linux/serial_core.h>
#include <linux/major.h> #include <linux/major.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -148,7 +146,7 @@ static void serial_remove(dev_link_t *link) ...@@ -148,7 +146,7 @@ static void serial_remove(dev_link_t *link)
*/ */
if (info->link.state & DEV_CONFIG) { if (info->link.state & DEV_CONFIG) {
for (i = 0; i < info->ndev; i++) for (i = 0; i < info->ndev; i++)
unregister_serial(info->line[i]); serial8250_unregister_port(info->line[i]);
info->link.dev = NULL; info->link.dev = NULL;
...@@ -304,21 +302,22 @@ static void serial_detach(dev_link_t * link) ...@@ -304,21 +302,22 @@ static void serial_detach(dev_link_t * link)
/*====================================================================*/ /*====================================================================*/
static int setup_serial(struct serial_info * info, ioaddr_t port, int irq) static int setup_serial(struct serial_info * info, ioaddr_t iobase, int irq)
{ {
struct serial_struct serial; struct uart_port port;
int line; int line;
memset(&serial, 0, sizeof (serial)); memset(&port, 0, sizeof (struct uart_port));
serial.port = port; port.iobase = iobase;
serial.irq = irq; port.irq = irq;
serial.flags = UPF_SKIP_TEST | UPF_SHARE_IRQ; port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_SHARE_IRQ;
port.uartclk = 1843200;
if (buggy_uart) if (buggy_uart)
serial.flags |= UPF_BUGGY_UART; port.flags |= UPF_BUGGY_UART;
line = register_serial(&serial); line = serial8250_register_port(&port);
if (line < 0) { if (line < 0) {
printk(KERN_NOTICE "serial_cs: register_serial() at 0x%04lx," printk(KERN_NOTICE "serial_cs: serial8250_register_port() at "
" irq %d failed\n", (u_long) serial.port, serial.irq); "0x%04lx, irq %d failed\n", (u_long)iobase, irq);
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment