]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/serial/mpsc.c
[NET]: Can use __get_cpu_var() instead of per_cpu() in loopback driver.
[linux-2.6-omap-h63xx.git] / drivers / serial / mpsc.c
index 1cd102f84bfad80bd789016880ddb4a9f2d0c94d..8eea69f29989947d3c8ca0f16c08a0ee08f965bc 100644 (file)
@@ -50,7 +50,6 @@
  * 4) AFAICT, hardware flow control isn't supported by the controller --MAG.
  */
 
-#include <linux/config.h>
 
 #if defined(CONFIG_SERIAL_MPSC_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
 #define SUPPORT_SYSRQ
@@ -993,7 +992,7 @@ mpsc_make_ready(struct mpsc_port_info *pi)
  */
 
 static inline int
-mpsc_rx_intr(struct mpsc_port_info *pi, struct pt_regs *regs)
+mpsc_rx_intr(struct mpsc_port_info *pi)
 {
        struct mpsc_rx_desc *rxre;
        struct tty_struct *tty = pi->port.info->tty;
@@ -1073,7 +1072,7 @@ mpsc_rx_intr(struct mpsc_port_info *pi, struct pt_regs *regs)
                                flag = TTY_PARITY;
                }
 
-               if (uart_handle_sysrq_char(&pi->port, *bp, regs)) {
+               if (uart_handle_sysrq_char(&pi->port, *bp)) {
                        bp++;
                        bytes_in--;
                        goto next_frame;
@@ -1258,7 +1257,7 @@ mpsc_tx_intr(struct mpsc_port_info *pi)
  * handling those descriptors, we restart the Rx/Tx engines if they're stopped.
  */
 static irqreturn_t
-mpsc_sdma_intr(int irq, void *dev_id, struct pt_regs *regs)
+mpsc_sdma_intr(int irq, void *dev_id)
 {
        struct mpsc_port_info *pi = dev_id;
        ulong iflags;
@@ -1268,7 +1267,7 @@ mpsc_sdma_intr(int irq, void *dev_id, struct pt_regs *regs)
 
        spin_lock_irqsave(&pi->port.lock, iflags);
        mpsc_sdma_intr_ack(pi);
-       if (mpsc_rx_intr(pi, regs))
+       if (mpsc_rx_intr(pi))
                rc = IRQ_HANDLED;
        if (mpsc_tx_intr(pi))
                rc = IRQ_HANDLED;
@@ -1413,7 +1412,7 @@ mpsc_startup(struct uart_port *port)
 
                /* If irq's are shared, need to set flag */
                if (mpsc_ports[0].port.irq == mpsc_ports[1].port.irq)
-                       flag = SA_SHIRQ;
+                       flag = IRQF_SHARED;
 
                if (request_irq(pi->port.irq, mpsc_sdma_intr, flag,
                                "mpsc-sdma", pi))
@@ -1894,6 +1893,10 @@ mpsc_drv_map_regs(struct mpsc_port_info *pi, struct platform_device *pd)
        }
        else {
                mpsc_resource_err("SDMA base");
+               if (pi->mpsc_base) {
+                       iounmap(pi->mpsc_base);
+                       pi->mpsc_base = NULL;
+               }
                return -ENOMEM;
        }
 
@@ -1906,6 +1909,14 @@ mpsc_drv_map_regs(struct mpsc_port_info *pi, struct platform_device *pd)
        }
        else {
                mpsc_resource_err("BRG base");
+               if (pi->mpsc_base) {
+                       iounmap(pi->mpsc_base);
+                       pi->mpsc_base = NULL;
+               }
+               if (pi->sdma_base) {
+                       iounmap(pi->sdma_base);
+                       pi->sdma_base = NULL;
+               }
                return -ENOMEM;
        }