Skip to content

Commit

Permalink
ASoC: switch over to use snd_soc_register_component() on omap mcbsp
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 7fc34cc commit 43cd814
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions sound/soc/omap/omap-mcbsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,10 @@ static struct snd_soc_dai_driver omap_mcbsp_dai = {
.ops = &mcbsp_dai_ops,
};

static const struct snd_soc_component_driver omap_mcbsp_component = {
.name = "omap-mcbsp",
};

static int omap_mcbsp_st_info_volsw(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{
Expand Down Expand Up @@ -793,7 +797,8 @@ static int asoc_mcbsp_probe(struct platform_device *pdev)

ret = omap_mcbsp_init(pdev);
if (!ret)
return snd_soc_register_dai(&pdev->dev, &omap_mcbsp_dai);
return snd_soc_register_component(&pdev->dev, &omap_mcbsp_component,
&omap_mcbsp_dai, 1);

return ret;
}
Expand All @@ -802,7 +807,7 @@ static int asoc_mcbsp_remove(struct platform_device *pdev)
{
struct omap_mcbsp *mcbsp = platform_get_drvdata(pdev);

snd_soc_unregister_dai(&pdev->dev);
snd_soc_unregister_component(&pdev->dev);

if (mcbsp->pdata->ops && mcbsp->pdata->ops->free)
mcbsp->pdata->ops->free(mcbsp->id);
Expand Down

0 comments on commit 43cd814

Please sign in to comment.