aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/mwave
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2005-08-31 17:19:33 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-08-31 17:19:33 -0400
commit5981d644209c38029df7f91eb8c61bc5952f182b (patch)
tree68d05c78caee0ac9e8e9e0d569326bdbd3fb73a9 /drivers/char/mwave
parent0f302dc35412dc67035efc188b9d5c40711b4222 (diff)
[SERIAL] Convert mwave to use serial8250_(un)?register_port
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/char/mwave')
-rw-r--r--drivers/char/mwave/mwavedd.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/char/mwave/mwavedd.c b/drivers/char/mwave/mwavedd.c
index d568991ac6b3..8666171e187b 100644
--- a/drivers/char/mwave/mwavedd.c
+++ b/drivers/char/mwave/mwavedd.c
@@ -57,6 +57,7 @@
57#include <linux/sched.h> 57#include <linux/sched.h>
58#include <linux/spinlock.h> 58#include <linux/spinlock.h>
59#include <linux/delay.h> 59#include <linux/delay.h>
60#include <linux/serial_8250.h>
60#include "smapi.h" 61#include "smapi.h"
61#include "mwavedd.h" 62#include "mwavedd.h"
62#include "3780i.h" 63#include "3780i.h"
@@ -410,8 +411,8 @@ static ssize_t mwave_write(struct file *file, const char __user *buf,
410 411
411static int register_serial_portandirq(unsigned int port, int irq) 412static int register_serial_portandirq(unsigned int port, int irq)
412{ 413{
413 struct serial_struct serial; 414 struct uart_port uart;
414 415
415 switch ( port ) { 416 switch ( port ) {
416 case 0x3f8: 417 case 0x3f8:
417 case 0x2f8: 418 case 0x2f8:
@@ -442,12 +443,14 @@ static int register_serial_portandirq(unsigned int port, int irq)
442 } /* switch */ 443 } /* switch */
443 /* irq is okay */ 444 /* irq is okay */
444 445
445 memset(&serial, 0, sizeof(serial)); 446 memset(&uart, 0, sizeof(struct uart_port));
446 serial.port = port; 447
447 serial.irq = irq; 448 uart.uartclk = 1843200;
448 serial.flags = ASYNC_SHARE_IRQ; 449 uart.iobase = port;
449 450 uart.irq = irq;
450 return register_serial(&serial); 451 uart.iotype = UPIO_PORT;
452 uart.flags = UPF_SHARE_IRQ;
453 return serial8250_register_port(&uart);
451} 454}
452 455
453 456
@@ -523,7 +526,7 @@ static void mwave_exit(void)
523#endif 526#endif
524 527
525 if ( pDrvData->sLine >= 0 ) { 528 if ( pDrvData->sLine >= 0 ) {
526 unregister_serial(pDrvData->sLine); 529 serial8250_unregister_port(pDrvData->sLine);
527 } 530 }
528 if (pDrvData->bMwaveDevRegistered) { 531 if (pDrvData->bMwaveDevRegistered) {
529 misc_deregister(&mwave_misc_dev); 532 misc_deregister(&mwave_misc_dev);