diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/soc-generic-dmaengine-pcm.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c index 98e131037fd8..e29ec3cd84b1 100644 --- a/sound/soc/soc-generic-dmaengine-pcm.c +++ b/sound/soc/soc-generic-dmaengine-pcm.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <sound/soc.h> | 21 | #include <sound/soc.h> |
22 | #include <linux/dma-mapping.h> | 22 | #include <linux/dma-mapping.h> |
23 | #include <linux/of.h> | 23 | #include <linux/of.h> |
24 | #include <linux/of_dma.h> | ||
25 | 24 | ||
26 | #include <sound/dmaengine_pcm.h> | 25 | #include <sound/dmaengine_pcm.h> |
27 | 26 | ||
@@ -219,19 +218,19 @@ static const char * const dmaengine_pcm_dma_channel_names[] = { | |||
219 | }; | 218 | }; |
220 | 219 | ||
221 | static void dmaengine_pcm_request_chan_of(struct dmaengine_pcm *pcm, | 220 | static void dmaengine_pcm_request_chan_of(struct dmaengine_pcm *pcm, |
222 | struct device_node *of_node) | 221 | struct device *dev) |
223 | { | 222 | { |
224 | unsigned int i; | 223 | unsigned int i; |
225 | 224 | ||
226 | if ((pcm->flags & SND_DMAENGINE_PCM_FLAG_NO_DT) || !of_node) | 225 | if ((pcm->flags & SND_DMAENGINE_PCM_FLAG_NO_DT) || !dev->of_node) |
227 | return; | 226 | return; |
228 | 227 | ||
229 | if (pcm->flags & SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX) { | 228 | if (pcm->flags & SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX) { |
230 | pcm->chan[0] = of_dma_request_slave_channel(of_node, "rx-tx"); | 229 | pcm->chan[0] = dma_request_slave_channel(dev, "rx-tx"); |
231 | pcm->chan[1] = pcm->chan[0]; | 230 | pcm->chan[1] = pcm->chan[0]; |
232 | } else { | 231 | } else { |
233 | for (i = SNDRV_PCM_STREAM_PLAYBACK; i <= SNDRV_PCM_STREAM_CAPTURE; i++) { | 232 | for (i = SNDRV_PCM_STREAM_PLAYBACK; i <= SNDRV_PCM_STREAM_CAPTURE; i++) { |
234 | pcm->chan[i] = of_dma_request_slave_channel(of_node, | 233 | pcm->chan[i] = dma_request_slave_channel(dev, |
235 | dmaengine_pcm_dma_channel_names[i]); | 234 | dmaengine_pcm_dma_channel_names[i]); |
236 | } | 235 | } |
237 | } | 236 | } |
@@ -255,7 +254,7 @@ int snd_dmaengine_pcm_register(struct device *dev, | |||
255 | pcm->config = config; | 254 | pcm->config = config; |
256 | pcm->flags = flags; | 255 | pcm->flags = flags; |
257 | 256 | ||
258 | dmaengine_pcm_request_chan_of(pcm, dev->of_node); | 257 | dmaengine_pcm_request_chan_of(pcm, dev); |
259 | 258 | ||
260 | if (flags & SND_DMAENGINE_PCM_FLAG_NO_RESIDUE) | 259 | if (flags & SND_DMAENGINE_PCM_FLAG_NO_RESIDUE) |
261 | return snd_soc_add_platform(dev, &pcm->platform, | 260 | return snd_soc_add_platform(dev, &pcm->platform, |