Re: [FINAL WARNING] Removal of deprecated serial functions - please update your drivers NOW

From: Alan Cox (alan_at_lxorguk.ukuu.org.uk)
Date: 08/31/05

  • Next message: Steven Rostedt: "Re: [FYI] 2.6.13-rt3 and a nanosleep jitter test."
    To: Russell King <rmk+lkml@arm.linux.org.uk>
    Date:	Wed, 31 Aug 2005 16:49:59 +0100
    
    

    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);

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Steven Rostedt: "Re: [FYI] 2.6.13-rt3 and a nanosleep jitter test."

    Relevant Pages