From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
Now we have devm_snd_soc_register_component(). Let's use it instead of snd_soc_register_component().
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/au1x/ac97c.c | 4 +--- sound/soc/au1x/i2sc.c | 4 +--- sound/soc/au1x/psc-ac97.c | 4 +--- sound/soc/au1x/psc-i2s.c | 4 +--- 4 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/sound/soc/au1x/ac97c.c b/sound/soc/au1x/ac97c.c index 66d6c52..f1ddca2 100644 --- a/sound/soc/au1x/ac97c.c +++ b/sound/soc/au1x/ac97c.c @@ -275,7 +275,7 @@ static int au1xac97c_drvprobe(struct platform_device *pdev) if (ret) return ret;
- ret = snd_soc_register_component(&pdev->dev, &au1xac97c_component, + ret = devm_snd_soc_register_component(&pdev->dev, &au1xac97c_component, &au1xac97c_dai_driver, 1); if (ret) return ret; @@ -288,8 +288,6 @@ static int au1xac97c_drvremove(struct platform_device *pdev) { struct au1xpsc_audio_data *ctx = platform_get_drvdata(pdev);
- snd_soc_unregister_component(&pdev->dev); - WR(ctx, AC97_ENABLE, EN_D); /* clock off, disable */
ac97c_workdata = NULL; /* MDEV */ diff --git a/sound/soc/au1x/i2sc.c b/sound/soc/au1x/i2sc.c index 450c842..b35b079 100644 --- a/sound/soc/au1x/i2sc.c +++ b/sound/soc/au1x/i2sc.c @@ -264,7 +264,7 @@ static int au1xi2s_drvprobe(struct platform_device *pdev)
platform_set_drvdata(pdev, ctx);
- return snd_soc_register_component(&pdev->dev, &au1xi2s_component, + return devm_snd_soc_register_component(&pdev->dev, &au1xi2s_component, &au1xi2s_dai_driver, 1); }
@@ -272,8 +272,6 @@ static int au1xi2s_drvremove(struct platform_device *pdev) { struct au1xpsc_audio_data *ctx = platform_get_drvdata(pdev);
- snd_soc_unregister_component(&pdev->dev); - WR(ctx, I2S_ENABLE, EN_D); /* clock off, disable */
return 0; diff --git a/sound/soc/au1x/psc-ac97.c b/sound/soc/au1x/psc-ac97.c index a2050ae..712c386 100644 --- a/sound/soc/au1x/psc-ac97.c +++ b/sound/soc/au1x/psc-ac97.c @@ -417,7 +417,7 @@ static int au1xpsc_ac97_drvprobe(struct platform_device *pdev) if (ret) return ret;
- ret = snd_soc_register_component(&pdev->dev, &au1xpsc_ac97_component, + ret = devm_snd_soc_register_component(&pdev->dev, &au1xpsc_ac97_component, &wd->dai_drv, 1); if (ret) return ret; @@ -430,8 +430,6 @@ static int au1xpsc_ac97_drvremove(struct platform_device *pdev) { struct au1xpsc_audio_data *wd = platform_get_drvdata(pdev);
- snd_soc_unregister_component(&pdev->dev); - /* disable PSC completely */ __raw_writel(0, AC97_CFG(wd)); wmb(); /* drain writebuffer */ diff --git a/sound/soc/au1x/psc-i2s.c b/sound/soc/au1x/psc-i2s.c index e6eec08..33d90aa 100644 --- a/sound/soc/au1x/psc-i2s.c +++ b/sound/soc/au1x/psc-i2s.c @@ -343,7 +343,7 @@ static int au1xpsc_i2s_drvprobe(struct platform_device *pdev)
platform_set_drvdata(pdev, wd);
- return snd_soc_register_component(&pdev->dev, &au1xpsc_i2s_component, + return devm_snd_soc_register_component(&pdev->dev, &au1xpsc_i2s_component, &wd->dai_drv, 1); }
@@ -351,8 +351,6 @@ static int au1xpsc_i2s_drvremove(struct platform_device *pdev) { struct au1xpsc_audio_data *wd = platform_get_drvdata(pdev);
- snd_soc_unregister_component(&pdev->dev); - __raw_writel(0, I2S_CFG(wd)); wmb(); /* drain writebuffer */ __raw_writel(PSC_CTRL_DISABLE, PSC_CTRL(wd));