summaryrefslogtreecommitdiff
path: root/sound/soc/kirkwood/kirkwood-i2s.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2018-01-29 02:48:03 +0000
committerMark Brown <broonie@kernel.org>2018-02-12 11:45:28 +0000
commitf98fc0f8154ed17a00a588f1a95f02cb3e33b0d0 (patch)
treeef125bd6a86e4dc605c8389a57eb7b058a01a543 /sound/soc/kirkwood/kirkwood-i2s.c
parentddce03ceea3c84bbfca6f465853b543b32184ec2 (diff)
ASoC: kirkwood: replace platform to component
Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/kirkwood/kirkwood-i2s.c')
-rw-r--r--sound/soc/kirkwood/kirkwood-i2s.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c
index 105a73cc5158..9a2777b72dcd 100644
--- a/sound/soc/kirkwood/kirkwood-i2s.c
+++ b/sound/soc/kirkwood/kirkwood-i2s.c
@@ -26,8 +26,6 @@
#include "kirkwood.h"
-#define DRV_NAME "mvebu-audio"
-
#define KIRKWOOD_I2S_FORMATS \
(SNDRV_PCM_FMTBIT_S16_LE | \
SNDRV_PCM_FMTBIT_S24_LE | \
@@ -524,10 +522,6 @@ static struct snd_soc_dai_driver kirkwood_i2s_dai_extclk[2] = {
},
};
-static const struct snd_soc_component_driver kirkwood_i2s_component = {
- .name = DRV_NAME,
-};
-
static int kirkwood_i2s_dev_probe(struct platform_device *pdev)
{
struct kirkwood_asoc_platform_data *data = pdev->dev.platform_data;
@@ -601,24 +595,17 @@ static int kirkwood_i2s_dev_probe(struct platform_device *pdev)
priv->ctl_rec |= KIRKWOOD_RECCTL_BURST_128;
}
- err = snd_soc_register_component(&pdev->dev, &kirkwood_i2s_component,
+ err = devm_snd_soc_register_component(&pdev->dev, &kirkwood_soc_component,
soc_dai, 2);
if (err) {
dev_err(&pdev->dev, "snd_soc_register_component failed\n");
goto err_component;
}
- err = snd_soc_register_platform(&pdev->dev, &kirkwood_soc_platform);
- if (err) {
- dev_err(&pdev->dev, "snd_soc_register_platform failed\n");
- goto err_platform;
- }
-
kirkwood_i2s_init(priv);
return 0;
- err_platform:
- snd_soc_unregister_component(&pdev->dev);
+
err_component:
if (!IS_ERR(priv->extclk))
clk_disable_unprepare(priv->extclk);
@@ -631,9 +618,6 @@ static int kirkwood_i2s_dev_remove(struct platform_device *pdev)
{
struct kirkwood_dma_data *priv = dev_get_drvdata(&pdev->dev);
- snd_soc_unregister_platform(&pdev->dev);
- snd_soc_unregister_component(&pdev->dev);
-
if (!IS_ERR(priv->extclk))
clk_disable_unprepare(priv->extclk);
clk_disable_unprepare(priv->clk);