summaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/atom/sst-mfld-platform-pcm.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-04-02 19:51:39 +0200
committerTakashi Iwai <tiwai@suse.de>2018-04-02 19:51:39 +0200
commit903d271a3f83826ef810a4b5dbbd9842cf0465d6 (patch)
tree07fd60b1d7ad07ba36c82b2e83ece7c7eb6e6ce9 /sound/soc/intel/atom/sst-mfld-platform-pcm.c
parentbc334cb61b9ee6e85b9bb01519989a3ae8fe03f6 (diff)
parent445bb423f6a3c50788529a33b82e45148001e855 (diff)
downloadlinux-0-day-903d271a3f83826ef810a4b5dbbd9842cf0465d6.tar.gz
linux-0-day-903d271a3f83826ef810a4b5dbbd9842cf0465d6.tar.xz
Merge tag 'asoc-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Updates for v4.17 This is a *very* big release for ASoC. Not much change in the core but there s the transition of all the individual drivers over to components which is intended to support further core work. The goal is to make it easier to do further core work by removing the need to special case all the different driver classes in the core, many of the devices end up being used in multiple roles in modern systems. We also have quite a lot of new drivers added this month of all kinds, quite a few for simple devices but also some more advanced ones with more substantial code. - The biggest thing is the huge series from Morimoto-san which converted everything over to components. This is a huge change by code volume but was fairly mechanical - Many fixes for some of the Realtek based Baytrail systems covering both the CODECs and the CPUs, contributed by Hans de Goode. - Lots of cleanups for Samsung based Odroid systems from Sylwester Nawrocki. - The Freescale SSI driver also got a lot of cleanups from Nicolin Chen. - The Blackfin drivers have been removed as part of the removal of the architecture. - New drivers for AKM AK4458 and AK5558, several AMD based machines, several Intel based machines, Maxim MAX9759, Motorola CPCAP, Socionext Uniphier SoCs, and TI PCM1789 and TDA7419
Diffstat (limited to 'sound/soc/intel/atom/sst-mfld-platform-pcm.c')
-rw-r--r--sound/soc/intel/atom/sst-mfld-platform-pcm.c32
1 files changed, 9 insertions, 23 deletions
diff --git a/sound/soc/intel/atom/sst-mfld-platform-pcm.c b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
index 43e7fdd19f291..6c36da5608775 100644
--- a/sound/soc/intel/atom/sst-mfld-platform-pcm.c
+++ b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
@@ -697,26 +697,22 @@ static int sst_pcm_new(struct snd_soc_pcm_runtime *rtd)
return retval;
}
-static int sst_soc_probe(struct snd_soc_platform *platform)
+static int sst_soc_probe(struct snd_soc_component *component)
{
- struct sst_data *drv = dev_get_drvdata(platform->dev);
+ struct sst_data *drv = dev_get_drvdata(component->dev);
- drv->soc_card = platform->component.card;
- return sst_dsp_init_v2_dpcm(platform);
+ drv->soc_card = component->card;
+ return sst_dsp_init_v2_dpcm(component);
}
-static const struct snd_soc_platform_driver sst_soc_platform_drv = {
+static const struct snd_soc_component_driver sst_soc_platform_drv = {
+ .name = DRV_NAME,
.probe = sst_soc_probe,
.ops = &sst_platform_ops,
.compr_ops = &sst_platform_compr_ops,
.pcm_new = sst_pcm_new,
};
-static const struct snd_soc_component_driver sst_component = {
- .name = "sst",
-};
-
-
static int sst_platform_probe(struct platform_device *pdev)
{
struct sst_data *drv;
@@ -740,26 +736,16 @@ static int sst_platform_probe(struct platform_device *pdev)
mutex_init(&drv->lock);
dev_set_drvdata(&pdev->dev, drv);
- ret = snd_soc_register_platform(&pdev->dev, &sst_soc_platform_drv);
- if (ret) {
- dev_err(&pdev->dev, "registering soc platform failed\n");
- return ret;
- }
-
- ret = snd_soc_register_component(&pdev->dev, &sst_component,
+ ret = devm_snd_soc_register_component(&pdev->dev, &sst_soc_platform_drv,
sst_platform_dai, ARRAY_SIZE(sst_platform_dai));
- if (ret) {
+ if (ret)
dev_err(&pdev->dev, "registering cpu dais failed\n");
- snd_soc_unregister_platform(&pdev->dev);
- }
+
return ret;
}
static int sst_platform_remove(struct platform_device *pdev)
{
-
- snd_soc_unregister_component(&pdev->dev);
- snd_soc_unregister_platform(&pdev->dev);
dev_dbg(&pdev->dev, "sst_platform_remove success\n");
return 0;
}