Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 372048
b: refs/heads/master
c: 6f1fd93
h: refs/heads/master
v: v3
  • Loading branch information
Shawn Guo authored and Mark Brown committed Apr 23, 2013
1 parent b65e3ed commit c2b1c8f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 19133d2cfd9d6ad8365d94137dcd3e18f760c8e2
refs/heads/master: 6f1fd93e304f6f4f8b841e1b0124f3ab4c85ba2e
11 changes: 5 additions & 6 deletions trunk/sound/soc/soc-generic-dmaengine-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <sound/soc.h>
#include <linux/dma-mapping.h>
#include <linux/of.h>
#include <linux/of_dma.h>

#include <sound/dmaengine_pcm.h>

Expand Down Expand Up @@ -219,19 +218,19 @@ static const char * const dmaengine_pcm_dma_channel_names[] = {
};

static void dmaengine_pcm_request_chan_of(struct dmaengine_pcm *pcm,
struct device_node *of_node)
struct device *dev)
{
unsigned int i;

if ((pcm->flags & SND_DMAENGINE_PCM_FLAG_NO_DT) || !of_node)
if ((pcm->flags & SND_DMAENGINE_PCM_FLAG_NO_DT) || !dev->of_node)
return;

if (pcm->flags & SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX) {
pcm->chan[0] = of_dma_request_slave_channel(of_node, "rx-tx");
pcm->chan[0] = dma_request_slave_channel(dev, "rx-tx");
pcm->chan[1] = pcm->chan[0];
} else {
for (i = SNDRV_PCM_STREAM_PLAYBACK; i <= SNDRV_PCM_STREAM_CAPTURE; i++) {
pcm->chan[i] = of_dma_request_slave_channel(of_node,
pcm->chan[i] = dma_request_slave_channel(dev,
dmaengine_pcm_dma_channel_names[i]);
}
}
Expand All @@ -255,7 +254,7 @@ int snd_dmaengine_pcm_register(struct device *dev,
pcm->config = config;
pcm->flags = flags;

dmaengine_pcm_request_chan_of(pcm, dev->of_node);
dmaengine_pcm_request_chan_of(pcm, dev);

if (flags & SND_DMAENGINE_PCM_FLAG_NO_RESIDUE)
return snd_soc_add_platform(dev, &pcm->platform,
Expand Down

0 comments on commit c2b1c8f

Please sign in to comment.