]> git.karo-electronics.de Git - linux-beck.git/blobdiff - sound/soc/codecs/wm8400.c
ASoC: Factor out snd_soc_init_card()
[linux-beck.git] / sound / soc / codecs / wm8400.c
index b9ef4d9152211a7649249e0f6a96c50f484147b0..0e30997c8db06d3e295413a486dfbeb597abfcbe 100644 (file)
@@ -1011,7 +1011,8 @@ static int fll_factors(struct wm8400_priv *wm8400, struct fll_factors *factors,
 }
 
 static int wm8400_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id,
-                             unsigned int freq_in, unsigned int freq_out)
+                             int source, unsigned int freq_in,
+                             unsigned int freq_out)
 {
        struct snd_soc_codec *codec = codec_dai->codec;
        struct wm8400_priv *wm8400 = codec->private_data;
@@ -1399,12 +1400,6 @@ static int wm8400_probe(struct platform_device *pdev)
        wm8400_add_controls(codec);
        wm8400_add_widgets(codec);
 
-       ret = snd_soc_init_card(socdev);
-       if (ret < 0) {
-               dev_err(&pdev->dev, "failed to register card\n");
-               goto card_err;
-       }
-
        return ret;
 
 card_err:
@@ -1558,21 +1553,6 @@ static int __exit wm8400_codec_remove(struct platform_device *dev)
        return 0;
 }
 
-#ifdef CONFIG_PM
-static int wm8400_pdev_suspend(struct platform_device *pdev, pm_message_t msg)
-{
-       return snd_soc_suspend_device(&pdev->dev);
-}
-
-static int wm8400_pdev_resume(struct platform_device *pdev)
-{
-       return snd_soc_resume_device(&pdev->dev);
-}
-#else
-#define wm8400_pdev_suspend NULL
-#define wm8400_pdev_resume NULL
-#endif
-
 static struct platform_driver wm8400_codec_driver = {
        .driver = {
                .name = "wm8400-codec",
@@ -1580,8 +1560,6 @@ static struct platform_driver wm8400_codec_driver = {
        },
        .probe = wm8400_codec_probe,
        .remove = __exit_p(wm8400_codec_remove),
-       .suspend = wm8400_pdev_suspend,
-       .resume = wm8400_pdev_resume,
 };
 
 static int __init wm8400_codec_init(void)