Skip to content

Commit

Permalink
ASoC: switch over to use snd_soc_register_component() on atmel ssc
Browse files Browse the repository at this point in the history
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Kuninori Morimoto authored and Mark Brown committed Mar 26, 2013
1 parent f298a0f commit a2c662c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions sound/soc/atmel/atmel_ssc_dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -707,13 +707,18 @@ static struct snd_soc_dai_driver atmel_ssc_dai = {
.ops = &atmel_ssc_dai_ops,
};

static const struct snd_soc_component_driver atmel_ssc_component = {
.name = "atmel-ssc",
};

static int asoc_ssc_init(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct ssc_device *ssc = platform_get_drvdata(pdev);
int ret;

ret = snd_soc_register_dai(dev, &atmel_ssc_dai);
ret = snd_soc_register_component(dev, &atmel_ssc_component,
&atmel_ssc_dai, 1);
if (ret) {
dev_err(dev, "Could not register DAI: %d\n", ret);
goto err;
Expand All @@ -732,7 +737,7 @@ static int asoc_ssc_init(struct device *dev)
return 0;

err_unregister_dai:
snd_soc_unregister_dai(dev);
snd_soc_unregister_component(dev);
err:
return ret;
}
Expand All @@ -747,7 +752,7 @@ static void asoc_ssc_exit(struct device *dev)
else
atmel_pcm_pdc_platform_unregister(dev);

snd_soc_unregister_dai(dev);
snd_soc_unregister_component(dev);
}

/**
Expand Down

0 comments on commit a2c662c

Please sign in to comment.