ALSA: hda: revert change to 92hd83xxx power mapping
[safe/jmp/linux-2.6] / sound / drivers / serial-u16550.c
index 3a86a58..d8aab9d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *   serial.c
- *   Copyright (c) by Jaroslav Kysela <perex@suse.cz>,
+ *   Copyright (c) by Jaroslav Kysela <perex@perex.cz>,
  *                    Isaku Yamahata <yamahata@private.email.ne.jp>,
  *                   George Hansper <ghansper@apana.org.au>,
  *                   Hannu Savolainen
@@ -30,7 +30,6 @@
  *      More documentation can be found in serial-u16550.txt.
  */
 
-#include <sound/driver.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/err.h>
@@ -43,6 +42,7 @@
 #include <sound/initval.h>
 
 #include <linux/serial_reg.h>
+#include <linux/jiffies.h>
 
 #include <asm/io.h>
 
@@ -327,7 +327,7 @@ static void snd_uart16550_buffer_timer(unsigned long data)
  *  return 0 if found
  *  return negative error if not found
  */
-static int __init snd_uart16550_detect(struct snd_uart16550 *uart)
+static int __devinit snd_uart16550_detect(struct snd_uart16550 *uart)
 {
        unsigned long io_base = uart->base;
        int ok;
@@ -455,7 +455,7 @@ static void snd_uart16550_do_open(struct snd_uart16550 * uart)
                    | UART_IER_THRI     /* Enable Transmitter holding register empty interrupt */
                    ;
        }
-       outb(byte, uart->base + UART_IER);      /* Interupt enable Register */
+       outb(byte, uart->base + UART_IER);      /* Interrupt enable Register */
 
        inb(uart->base + UART_LSR);     /* Clear any pre-existing overrun indication */
        inb(uart->base + UART_IIR);     /* Clear any pre-existing transmit interrupt */
@@ -473,7 +473,7 @@ static void snd_uart16550_do_close(struct snd_uart16550 * uart)
 
        outb((0 & UART_IER_RDI)         /* Disable Receiver data interrupt */
             |(0 & UART_IER_THRI)       /* Disable Transmitter holding register empty interrupt */
-            ,uart->base + UART_IER);   /* Interupt enable Register */
+            ,uart->base + UART_IER);   /* Interrupt enable Register */
 
        switch (uart->adaptor) {
        default:
@@ -653,7 +653,7 @@ static void snd_uart16550_output_write(struct snd_rawmidi_substream *substream)
        char first;
        static unsigned long lasttime = 0;
        
-       /* Interupts are disabled during the updating of the tx_buff,
+       /* Interrupts are disabled during the updating of the tx_buff,
         * since it is 'bad' to have two processes updating the same
         * variables (ie buff_in & buff_out)
         */
@@ -694,7 +694,7 @@ static void snd_uart16550_output_write(struct snd_rawmidi_substream *substream)
                            (uart->adaptor == SNDRV_SERIAL_SOUNDCANVAS ||
                             uart->adaptor == SNDRV_SERIAL_GENERIC) &&
                            (uart->prev_out != substream->number ||
-                            jiffies-lasttime > 3*HZ)) {
+                            time_after(jiffies, lasttime + 3*HZ))) {
 
                                if (snd_uart16550_buffer_can_write(uart, 3)) {
                                        /* Roland Soundcanvas part selection */
@@ -781,7 +781,7 @@ static int snd_uart16550_dev_free(struct snd_device *device)
        return snd_uart16550_free(uart);
 }
 
-static int __init snd_uart16550_create(struct snd_card *card,
+static int __devinit snd_uart16550_create(struct snd_card *card,
                                       unsigned long iobase,
                                       int irq,
                                       unsigned int speed,
@@ -860,7 +860,7 @@ static int __init snd_uart16550_create(struct snd_card *card,
        return 0;
 }
 
-static void __init snd_uart16550_substreams(struct snd_rawmidi_str *stream)
+static void __devinit snd_uart16550_substreams(struct snd_rawmidi_str *stream)
 {
        struct snd_rawmidi_substream *substream;
 
@@ -869,7 +869,7 @@ static void __init snd_uart16550_substreams(struct snd_rawmidi_str *stream)
        }
 }
 
-static int __init snd_uart16550_rmidi(struct snd_uart16550 *uart, int device,
+static int __devinit snd_uart16550_rmidi(struct snd_uart16550 *uart, int device,
                                      int outs, int ins,
                                      struct snd_rawmidi **rmidi)
 {
@@ -896,7 +896,7 @@ static int __init snd_uart16550_rmidi(struct snd_uart16550 *uart, int device,
        return 0;
 }
 
-static int __init snd_serial_probe(struct platform_device *devptr)
+static int __devinit snd_serial_probe(struct platform_device *devptr)
 {
        struct snd_card *card;
        struct snd_uart16550 *uart;
@@ -981,7 +981,7 @@ static int __init snd_serial_probe(struct platform_device *devptr)
        return err;
 }
 
-static int snd_serial_remove(struct platform_device *devptr)
+static int __devexit snd_serial_remove(struct platform_device *devptr)
 {
        snd_card_free(platform_get_drvdata(devptr));
        platform_set_drvdata(devptr, NULL);
@@ -992,13 +992,13 @@ static int snd_serial_remove(struct platform_device *devptr)
 
 static struct platform_driver snd_serial_driver = {
        .probe          = snd_serial_probe,
-       .remove         = snd_serial_remove,
+       .remove         = __devexit_p( snd_serial_remove),
        .driver         = {
                .name   = SND_SERIAL_DRIVER
        },
 };
 
-static void __init_or_module snd_serial_unregister_all(void)
+static void snd_serial_unregister_all(void)
 {
        int i;