aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/haswell.c
diff options
context:
space:
mode:
authorJarkko Nikula <jarkko.nikula@linux.intel.com>2014-05-28 12:35:39 +0300
committerMark Brown <broonie@linaro.org>2014-06-01 11:50:45 +0100
commit8eb776ab17232b02d915b90f5dd14c45af86c3a0 (patch)
tree8e43eb76a0496dff4eb6794cf684e57cb4187536 /sound/soc/intel/haswell.c
parentASoC: Intel: remove duplicate headers (diff)
downloadlinux-dev-8eb776ab17232b02d915b90f5dd14c45af86c3a0.tar.xz
linux-dev-8eb776ab17232b02d915b90f5dd14c45af86c3a0.zip
ASoC: Intel: Use devm_snd_soc_register_card
Simplify byt-rt5640.c and haswell.c machine drivers by using devm_snd_soc_register_card(). Remove also needless dev_set_drvdata() from byt_rt5640_probe() since snd_soc_register_card() does it too. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Cc: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to '')
-rw-r--r--sound/soc/intel/haswell.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sound/soc/intel/haswell.c b/sound/soc/intel/haswell.c
index 54345a2a7386..6faa8de24f24 100644
--- a/sound/soc/intel/haswell.c
+++ b/sound/soc/intel/haswell.c
@@ -208,18 +208,11 @@ static int haswell_audio_probe(struct platform_device *pdev)
{
haswell_rt5640.dev = &pdev->dev;
- return snd_soc_register_card(&haswell_rt5640);
-}
-
-static int haswell_audio_remove(struct platform_device *pdev)
-{
- snd_soc_unregister_card(&haswell_rt5640);
- return 0;
+ return devm_snd_soc_register_card(&pdev->dev, &haswell_rt5640);
}
static struct platform_driver haswell_audio = {
.probe = haswell_audio_probe,
- .remove = haswell_audio_remove,
.driver = {
.name = "haswell-audio",
.owner = THIS_MODULE,