public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Russell King <rmk+lkml@arm.linux.org.uk>
Cc: Linux Kernel List <linux-kernel@vger.kernel.org>,
	amax@us.ibm.com, ralf@linux-mips.org, starvik@axis.com
Subject: Re: [FINAL WARNING] Removal of deprecated serial functions - please update your drivers NOW
Date: Wed, 31 Aug 2005 16:49:59 +0100	[thread overview]
Message-ID: <1125503399.3355.66.camel@localhost.localdomain> (raw)
In-Reply-To: <20050831103352.A26480@flint.arm.linux.org.uk>

I think this is all that is needed for Mwave.

Signed-off-by: Alan Cox <alan@redhat.com>

--- ../linux.vanilla-2.6.13-rc6-mm2/drivers/char/mwave/mwavedd.c	2005-08-25 17:04:20.000000000 +0100
+++ drivers/char/mwave/mwavedd.c	2005-08-31 16:16:29.128028248 +0100
@@ -57,6 +57,7 @@
 #include <linux/sched.h>
 #include <linux/spinlock.h>
 #include <linux/delay.h>
+#include <linux/serial_8250.h>
 #include "smapi.h"
 #include "mwavedd.h"
 #include "3780i.h"
@@ -410,8 +411,8 @@
 
 static int register_serial_portandirq(unsigned int port, int irq)
 {
-	struct serial_struct serial;
-
+	struct uart_port uart;
+	
 	switch ( port ) {
 		case 0x3f8:
 		case 0x2f8:
@@ -442,12 +443,14 @@
 	} /* switch */
 	/* irq is okay */
 
-	memset(&serial, 0, sizeof(serial));
-	serial.port = port;
-	serial.irq = irq;
-	serial.flags = ASYNC_SHARE_IRQ;
-
-	return register_serial(&serial);
+	memset(&uart, 0, sizeof(struct uart_port));
+	
+	uart.uartclk =  1843200;
+	uart.iobase = port;
+	uart.irq = irq;
+	uart.iotype = UPIO_PORT;
+	uart.flags =  UPF_SHARE_IRQ;
+	return serial8250_register_port(&uart);
 }
 
 
@@ -523,7 +526,7 @@
 #endif
 
 	if ( pDrvData->sLine >= 0 ) {
-		unregister_serial(pDrvData->sLine);
+		serial8250_unregister_port(pDrvData->sLine);
 	}
 	if (pDrvData->bMwaveDevRegistered) {
 		misc_deregister(&mwave_misc_dev);


  parent reply	other threads:[~2005-08-31 15:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-31  9:33 [FINAL WARNING] Removal of deprecated serial functions - please update your drivers NOW Russell King
2005-08-31 13:00 ` Alan Cox
2005-08-31 12:52   ` Russell King
2005-08-31 13:38     ` Alan Cox
2005-08-31 15:49 ` Alan Cox [this message]
2005-09-01 23:12 ` [2.6 patch] drivers/serial/crisv10.c: remove {,un}register_serial dummies Adrian Bunk
2005-09-02 15:58   ` Russell King
2005-09-07 19:12 ` [FINAL WARNING] Removal of deprecated serial functions - please update your drivers NOW Max Asbock
2005-09-07 19:25   ` Russell King
2005-09-07 20:13     ` Max Asbock

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1125503399.3355.66.camel@localhost.localdomain \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=amax@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ralf@linux-mips.org \
    --cc=rmk+lkml@arm.linux.org.uk \
    --cc=starvik@axis.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox