diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2014-04-22 16:46:34 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-04-22 16:53:21 -0400 |
commit | 050f62e4de52901cc0f7aebbd64876d2639a8657 (patch) | |
tree | b54caabd396d1aae06e3a733f95bc1549f9a7eeb | |
parent | 0e746d7b2b2c31a29b78ddb364bca9a01bd64ae7 (diff) |
ASoC: qi_lb60: Use devm_snd_soc_register_card()
Makes the code a bit shorter and will also allow us to remove the drivers
remove() callback eventually.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | sound/soc/jz4740/qi_lb60.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sound/soc/jz4740/qi_lb60.c b/sound/soc/jz4740/qi_lb60.c index 72ce103f7d68..be0a437f0888 100644 --- a/sound/soc/jz4740/qi_lb60.c +++ b/sound/soc/jz4740/qi_lb60.c | |||
@@ -86,7 +86,7 @@ static int qi_lb60_probe(struct platform_device *pdev) | |||
86 | 86 | ||
87 | card->dev = &pdev->dev; | 87 | card->dev = &pdev->dev; |
88 | 88 | ||
89 | ret = snd_soc_register_card(card); | 89 | ret = devm_snd_soc_register_card(&pdev->dev, card); |
90 | if (ret) { | 90 | if (ret) { |
91 | dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", | 91 | dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", |
92 | ret); | 92 | ret); |
@@ -97,9 +97,6 @@ static int qi_lb60_probe(struct platform_device *pdev) | |||
97 | 97 | ||
98 | static int qi_lb60_remove(struct platform_device *pdev) | 98 | static int qi_lb60_remove(struct platform_device *pdev) |
99 | { | 99 | { |
100 | struct snd_soc_card *card = platform_get_drvdata(pdev); | ||
101 | |||
102 | snd_soc_unregister_card(card); | ||
103 | gpio_free_array(qi_lb60_gpios, ARRAY_SIZE(qi_lb60_gpios)); | 100 | gpio_free_array(qi_lb60_gpios, ARRAY_SIZE(qi_lb60_gpios)); |
104 | return 0; | 101 | return 0; |
105 | } | 102 | } |