blob: 9acba60907eb7bac462e72383fcbf10e5ff9e1a1 [file] [log] [blame]
From 5a5c8a21c23c048134232d2daf8dc275c26c244d Mon Sep 17 00:00:00 2001
From: Alexandre Bounine <alexandre.bounine@idt.com>
Date: Thu, 8 Mar 2012 16:11:18 -0500
Subject: dmaengine/dma_slave: introduce inline wrappers
Add inline wrappers for device_prep_slave_sg() and device_prep_dma_cyclic()
interfaces to hide new parameter from current users of affected interfaces.
Convert current users to use new wrappers instead of direct calls.
Suggested by Russell King [https://lkml.org/lkml/2012/2/3/269].
Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
(cherry picked from commit 16052827d98fbc13c31ebad560af4bd53e2b4dd5)
Conflicts:
arch/arm/plat-samsung/dma-ops.c
arch/arm/plat-nomadik/include/plat/ste_dma40.h
drivers/media/video/mx3_camera.c
drivers/media/video/timblogiw.c
drivers/mmc/host/atmel-mci.c
drivers/mmc/host/mmci.c
drivers/mmc/host/mxcmmc.c
drivers/mmc/host/mxs-mmc.c
drivers/mmc/host/sh_mmcif.c
drivers/mmc/host/tmio_mmc_dma.c
drivers/mtd/nand/gpmi-nand/gpmi-lib.c
drivers/usb/musb/ux500_dma.c
drivers/net/ethernet/micrel/ks8842.c
drivers/spi/spi-dw-mid.c
drivers/spi/spi-ep93xx.c
drivers/spi/spi-pl022.c
drivers/spi/spi-topcliff-pch.c
drivers/tty/serial/amba-pl011.c
drivers/tty/serial/pch_uart.c
drivers/tty/serial/sh-sci.c
drivers/usb/renesas_usbhs/fifo.c
drivers/video/mx3fb.c
sound/soc/ep93xx/ep93xx-pcm.c
sound/soc/imx/imx-pcm-dma-mx2.c
sound/soc/mxs/mxs-pcm.c
sound/soc/sh/siu_pcm.c
sound/soc/txx9/txx9aclc.c
Signed-off-by: Simon Horman <horms@verge.net.au>
---
include/linux/dmaengine.h | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 56628b2..ee123d2 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -623,6 +623,22 @@ static inline struct dma_async_tx_descriptor *dmaengine_prep_slave_single(
return chan->device->device_prep_slave_sg(chan, &sg, 1, dir, flags);
}
+static inline struct dma_async_tx_descriptor *dmaengine_prep_slave_sg(
+ struct dma_chan *chan, struct scatterlist *sgl, unsigned int sg_len,
+ enum dma_transfer_direction dir, unsigned long flags)
+{
+ return chan->device->device_prep_slave_sg(chan, sgl, sg_len,
+ dir, flags);
+}
+
+static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_cyclic(
+ struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
+ size_t period_len, enum dma_transfer_direction dir)
+{
+ return chan->device->device_prep_dma_cyclic(chan, buf_addr, buf_len,
+ period_len, dir);
+}
+
static inline int dmaengine_terminate_all(struct dma_chan *chan)
{
return dmaengine_device_control(chan, DMA_TERMINATE_ALL, 0);
--
1.7.10.2.565.gbd578b5