serial: sh-sci: Kill off some DMA ifdeffery.
authorPaul Mundt <lethal@linux-sh.org>
Wed, 19 Jan 2011 06:37:31 +0000 (15:37 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Wed, 19 Jan 2011 06:37:31 +0000 (15:37 +0900)
There's nothing worth hiding under the ifdef in the platform DMA
definitions, and we certainly don't want board code adding this in to
their platform data definitions, so we always expose the slave rx/tx
and device pointer members instead.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
drivers/serial/sh-sci.c
include/linux/serial_sci.h

index dccc9822ab9bb2c4fd0539148aa95d7d05416f8d..5b3e9769ca2101fc8645a4ef6c1e5835412f0594 100644 (file)
@@ -1423,6 +1423,14 @@ static void sci_free_dma(struct uart_port *port)
        if (s->chan_rx)
                sci_rx_dma_release(s, false);
 }
+#else
+static inline void sci_request_dma(struct uart_port *port)
+{
+}
+
+static inline void sci_free_dma(struct uart_port *port)
+{
+}
 #endif
 
 static int sci_startup(struct uart_port *port)
@@ -1435,9 +1443,7 @@ static int sci_startup(struct uart_port *port)
                s->enable(port);
 
        sci_request_irq(s);
-#ifdef CONFIG_SERIAL_SH_SCI_DMA
        sci_request_dma(port);
-#endif
        sci_start_tx(port);
        sci_start_rx(port);
 
@@ -1452,9 +1458,7 @@ static void sci_shutdown(struct uart_port *port)
 
        sci_stop_rx(port);
        sci_stop_tx(port);
-#ifdef CONFIG_SERIAL_SH_SCI_DMA
        sci_free_dma(port);
-#endif
        sci_free_irq(s);
 
        if (s->disable)
@@ -1726,11 +1730,9 @@ static int __devinit sci_init_single(struct platform_device *dev,
         */
        port->irq               = p->irqs[SCIx_TXI_IRQ];
 
-#ifdef CONFIG_SERIAL_SH_SCI_DMA
        if (p->dma_dev)
                dev_dbg(port->dev, "DMA device %p, tx %d, rx %d\n",
                        p->dma_dev, p->dma_slave_tx, p->dma_slave_rx);
-#endif
 
        return 0;
 }
index 01ffe7c56e5b44706b1114158d59d9746f4ba702..a2afc9fbe1869369d3d8c3165091ab3e9f73c46f 100644 (file)
@@ -58,10 +58,8 @@ struct plat_sci_port {
 
        struct device   *dma_dev;
 
-#ifdef CONFIG_SERIAL_SH_SCI_DMA
-       unsigned int dma_slave_tx;
-       unsigned int dma_slave_rx;
-#endif
+       unsigned int    dma_slave_tx;
+       unsigned int    dma_slave_rx;
 };
 
 #endif /* __LINUX_SERIAL_SCI_H */
This page took 0.027749 seconds and 5 git commands to generate.