diff mbox

[2/8] net: irda/sa1100_ir: convert to dma_request_slave_channel()

Message ID E1beKhe-0001Gt-4k@rmk-PC.armlinux.org.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Russell King (Oracle) Aug. 29, 2016, 11:26 a.m. UTC
Convert the sa11x0 irda driver to use the more modern
dma_request_slave_channel() method to get the DMA channel, rather than
using dma_request_channel() with a filter function exported by DMA
driver.  This allows us to get rid of the sa11x0-dma.h include.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
 drivers/net/irda/sa1100_ir.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/drivers/net/irda/sa1100_ir.c b/drivers/net/irda/sa1100_ir.c
index b6e44ff4e373..7bc9c2955d4b 100644
--- a/drivers/net/irda/sa1100_ir.c
+++ b/drivers/net/irda/sa1100_ir.c
@@ -31,7 +31,6 @@ 
 #include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
 #include <linux/dmaengine.h>
-#include <linux/sa11x0-dma.h>
 
 #include <net/irda/irda.h>
 #include <net/irda/wrapper.h>
@@ -124,7 +123,7 @@  static int sa1100_irda_dma_request(struct device *dev, struct sa1100_buf *buf,
 	dma_cap_zero(m);
 	dma_cap_set(DMA_SLAVE, m);
 
-	buf->chan = dma_request_channel(m, sa11x0_dma_filter_fn, (void *)name);
+	buf->chan = dma_request_slave_channel(dev, name);
 	if (!buf->chan) {
 		dev_err(dev, "unable to request DMA channel for %s\n",
 			name);
@@ -797,12 +796,12 @@  static int sa1100_irda_start(struct net_device *dev)
 
 	si->speed = 9600;
 
-	err = sa1100_irda_dma_request(si->dev, &si->dma_rx, "Ser2ICPRc",
+	err = sa1100_irda_dma_request(si->dev, &si->dma_rx, "rx",
 				&sa1100_irda_fir_rx);
 	if (err)
 		goto err_rx_dma;
 
-	err = sa1100_irda_dma_request(si->dev, &si->dma_tx, "Ser2ICPTr",
+	err = sa1100_irda_dma_request(si->dev, &si->dma_tx, "tx",
 				&sa1100_irda_sir_tx);
 	if (err)
 		goto err_tx_dma;