diff options
| author | Lee Jones <lee.jones@linaro.org> | 2013-12-19 10:55:07 -0500 |
|---|---|---|
| committer | Mark Brown <broonie@linaro.org> | 2014-01-07 10:37:20 -0500 |
| commit | 86a3fdfc63402ffbcee226c4a2503eee14a41afe (patch) | |
| tree | 8e46eae97e942082e8f9050c271fdd12b8fa40f4 | |
| parent | ead20611a212db8ab4392cfc28092c9c849c69a4 (diff) | |
ASoC: ux500_pcm: Differentiate between pdata and DT initialisation
If booting with full DT support (i.e. DMA too, the last piece of the
puzzle), then we don't need to use the compatible_request_channel call
back or require some of the historical bumph which probably isn't
required by a platform data start-up now either. This will also be
ripped out in upcoming commits.
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
| -rw-r--r-- | sound/soc/ux500/ux500_pcm.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/sound/soc/ux500/ux500_pcm.c b/sound/soc/ux500/ux500_pcm.c index 3d1c342245f0..55a8634cc3da 100644 --- a/sound/soc/ux500/ux500_pcm.c +++ b/sound/soc/ux500/ux500_pcm.c | |||
| @@ -145,15 +145,25 @@ static const struct snd_dmaengine_pcm_config ux500_dmaengine_pcm_config = { | |||
| 145 | .prepare_slave_config = ux500_pcm_prepare_slave_config, | 145 | .prepare_slave_config = ux500_pcm_prepare_slave_config, |
| 146 | }; | 146 | }; |
| 147 | 147 | ||
| 148 | static const struct snd_dmaengine_pcm_config ux500_dmaengine_of_pcm_config = { | ||
| 149 | .compat_request_channel = ux500_pcm_request_chan, | ||
| 150 | .prepare_slave_config = ux500_pcm_prepare_slave_config, | ||
| 151 | }; | ||
| 152 | |||
| 148 | int ux500_pcm_register_platform(struct platform_device *pdev) | 153 | int ux500_pcm_register_platform(struct platform_device *pdev) |
| 149 | { | 154 | { |
| 155 | const struct snd_dmaengine_pcm_config *pcm_config; | ||
| 156 | struct device_node *np = pdev->dev.of_node; | ||
| 150 | int ret; | 157 | int ret; |
| 151 | 158 | ||
| 152 | ret = snd_dmaengine_pcm_register(&pdev->dev, | 159 | if (np) |
| 153 | &ux500_dmaengine_pcm_config, | 160 | pcm_config = &ux500_dmaengine_of_pcm_config; |
| 154 | SND_DMAENGINE_PCM_FLAG_NO_RESIDUE | | 161 | else |
| 155 | SND_DMAENGINE_PCM_FLAG_COMPAT | | 162 | pcm_config = &ux500_dmaengine_pcm_config; |
| 156 | SND_DMAENGINE_PCM_FLAG_NO_DT); | 163 | |
| 164 | ret = snd_dmaengine_pcm_register(&pdev->dev, pcm_config, | ||
| 165 | SND_DMAENGINE_PCM_FLAG_NO_RESIDUE | | ||
| 166 | SND_DMAENGINE_PCM_FLAG_COMPAT); | ||
| 157 | if (ret < 0) { | 167 | if (ret < 0) { |
| 158 | dev_err(&pdev->dev, | 168 | dev_err(&pdev->dev, |
| 159 | "%s: ERROR: Failed to register platform '%s' (%d)!\n", | 169 | "%s: ERROR: Failed to register platform '%s' (%d)!\n", |
