Commit 5981d644 authored by Alan Cox's avatar Alan Cox Committed by Russell King

[SERIAL] Convert mwave to use serial8250_(un)?register_port

Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 0f302dc3
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/serial_8250.h>
#include "smapi.h" #include "smapi.h"
#include "mwavedd.h" #include "mwavedd.h"
#include "3780i.h" #include "3780i.h"
...@@ -410,8 +411,8 @@ static ssize_t mwave_write(struct file *file, const char __user *buf, ...@@ -410,8 +411,8 @@ static ssize_t mwave_write(struct file *file, const char __user *buf,
static int register_serial_portandirq(unsigned int port, int irq) static int register_serial_portandirq(unsigned int port, int irq)
{ {
struct serial_struct serial; struct uart_port uart;
switch ( port ) { switch ( port ) {
case 0x3f8: case 0x3f8:
case 0x2f8: case 0x2f8:
...@@ -442,12 +443,14 @@ static int register_serial_portandirq(unsigned int port, int irq) ...@@ -442,12 +443,14 @@ static int register_serial_portandirq(unsigned int port, int irq)
} /* switch */ } /* switch */
/* irq is okay */ /* irq is okay */
memset(&serial, 0, sizeof(serial)); memset(&uart, 0, sizeof(struct uart_port));
serial.port = port;
serial.irq = irq; uart.uartclk = 1843200;
serial.flags = ASYNC_SHARE_IRQ; uart.iobase = port;
uart.irq = irq;
return register_serial(&serial); uart.iotype = UPIO_PORT;
uart.flags = UPF_SHARE_IRQ;
return serial8250_register_port(&uart);
} }
...@@ -523,7 +526,7 @@ static void mwave_exit(void) ...@@ -523,7 +526,7 @@ static void mwave_exit(void)
#endif #endif
if ( pDrvData->sLine >= 0 ) { if ( pDrvData->sLine >= 0 ) {
unregister_serial(pDrvData->sLine); serial8250_unregister_port(pDrvData->sLine);
} }
if (pDrvData->bMwaveDevRegistered) { if (pDrvData->bMwaveDevRegistered) {
misc_deregister(&mwave_misc_dev); misc_deregister(&mwave_misc_dev);
......
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