diff options
author | Mark Brown <broonie@kernel.org> | 2018-02-26 11:18:36 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-02-26 11:18:36 +0000 |
commit | 8596c5c36c0473ca086dc851e5bd90452b3355d9 (patch) | |
tree | a8b789bf6928ab3767315ce7c08d7ba02d9ed9f9 /sound/soc/au1x/dma.c | |
parent | 037002b14b7ae217aa79b260228ba51afc516a8c (diff) | |
parent | 78648092ef46255e6dc6685202164199c86cf930 (diff) | |
download | linux-8596c5c36c0473ca086dc851e5bd90452b3355d9.tar.bz2 |
Merge branch 'topic/generic-dmaengine' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-stm32
Diffstat (limited to 'sound/soc/au1x/dma.c')
-rw-r--r-- | sound/soc/au1x/dma.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sound/soc/au1x/dma.c b/sound/soc/au1x/dma.c index 19457e2b351e..efff1e293a1b 100644 --- a/sound/soc/au1x/dma.c +++ b/sound/soc/au1x/dma.c @@ -21,6 +21,8 @@ #include "psc.h" +#define DRV_NAME "au1x_dma" + struct pcm_period { u32 start; u32 relative_end; /* relative to start of buffer */ @@ -174,7 +176,8 @@ static const struct snd_pcm_hardware alchemy_pcm_hardware = { static inline struct alchemy_pcm_ctx *ss_to_ctx(struct snd_pcm_substream *ss) { struct snd_soc_pcm_runtime *rtd = ss->private_data; - return snd_soc_platform_get_drvdata(rtd->platform); + struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME); + return snd_soc_component_get_drvdata(component); } static inline struct audio_stream *ss_to_as(struct snd_pcm_substream *ss) @@ -297,7 +300,8 @@ static int alchemy_pcm_new(struct snd_soc_pcm_runtime *rtd) return 0; } -static struct snd_soc_platform_driver alchemy_pcm_soc_platform = { +static struct snd_soc_component_driver alchemy_pcm_soc_component = { + .name = DRV_NAME, .ops = &alchemy_pcm_ops, .pcm_new = alchemy_pcm_new, }; @@ -312,8 +316,8 @@ static int alchemy_pcm_drvprobe(struct platform_device *pdev) platform_set_drvdata(pdev, ctx); - return devm_snd_soc_register_platform(&pdev->dev, - &alchemy_pcm_soc_platform); + return devm_snd_soc_register_component(&pdev->dev, + &alchemy_pcm_soc_component, NULL, 0); } static struct platform_driver alchemy_pcmdma_driver = { |