ASoC: Remove platform device from DAI suspend and resume operations
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 3 Dec 2008 18:21:52 +0000 (18:21 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 3 Dec 2008 19:19:10 +0000 (19:19 +0000)
None of the DAIs use it except s3c2412-i2s which only uses it for
dev_() printouts.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 files changed:
include/sound/soc-dai.h
sound/soc/atmel/atmel_ssc_dai.c
sound/soc/au1x/psc-ac97.c
sound/soc/au1x/psc-i2s.c
sound/soc/blackfin/bf5xx-ac97.c
sound/soc/blackfin/bf5xx-i2s.c
sound/soc/pxa/pxa-ssp.c
sound/soc/pxa/pxa2xx-ac97.c
sound/soc/pxa/pxa2xx-i2s.c
sound/soc/s3c24xx/s3c2412-i2s.c
sound/soc/s3c24xx/s3c24xx-i2s.c
sound/soc/soc-core.c

index a01a24b101969663b141bca22c88df257e8ecde0..e2d5f76838c6e3e9b1b172d1da40cad5a26ac308 100644 (file)
@@ -191,10 +191,8 @@ struct snd_soc_dai {
                     struct snd_soc_dai *dai);
        void (*remove)(struct platform_device *pdev,
                       struct snd_soc_dai *dai);
-       int (*suspend)(struct platform_device *pdev,
-               struct snd_soc_dai *dai);
-       int (*resume)(struct platform_device *pdev,
-               struct snd_soc_dai *dai);
+       int (*suspend)(struct snd_soc_dai *dai);
+       int (*resume)(struct snd_soc_dai *dai);
 
        /* ops */
        struct snd_soc_dai_ops ops;
index 0bb18dfa949570975ae370eb99b6cc42afc4c7f9..d9b874c5bf375eb38f6c22944aa08a4516e3fb2e 100644 (file)
@@ -628,8 +628,7 @@ static int atmel_ssc_prepare(struct snd_pcm_substream *substream,
 
 
 #ifdef CONFIG_PM
-static int atmel_ssc_suspend(struct platform_device *pdev,
-                           struct snd_soc_dai *cpu_dai)
+static int atmel_ssc_suspend(struct snd_soc_dai *cpu_dai)
 {
        struct atmel_ssc_info *ssc_p;
 
@@ -657,8 +656,7 @@ static int atmel_ssc_suspend(struct platform_device *pdev,
 
 
 
-static int atmel_ssc_resume(struct platform_device *pdev,
-                          struct snd_soc_dai *cpu_dai)
+static int atmel_ssc_resume(struct snd_soc_dai *cpu_dai)
 {
        struct atmel_ssc_info *ssc_p;
        u32 cr;
index a0bcfeaf5f868e1fc582a13a940f3a82004f76cb..a1e824d29cf9ab165d1ab0a56ab52388809c9ac1 100644 (file)
@@ -314,8 +314,7 @@ static void au1xpsc_ac97_remove(struct platform_device *pdev,
        au1xpsc_ac97_workdata = NULL;
 }
 
-static int au1xpsc_ac97_suspend(struct platform_device *pdev,
-                               struct snd_soc_dai *dai)
+static int au1xpsc_ac97_suspend(struct snd_soc_dai *dai)
 {
        /* save interesting registers and disable PSC */
        au1xpsc_ac97_workdata->pm[0] =
@@ -329,8 +328,7 @@ static int au1xpsc_ac97_suspend(struct platform_device *pdev,
        return 0;
 }
 
-static int au1xpsc_ac97_resume(struct platform_device *pdev,
-                              struct snd_soc_dai *dai)
+static int au1xpsc_ac97_resume(struct snd_soc_dai *dai)
 {
        /* restore PSC clock config */
        au_writel(au1xpsc_ac97_workdata->pm[0] | PSC_SEL_PS_AC97MODE,
index f4217e70a7871b41328d88ee6a1814cd1189f3c1..16f97462ea15e1f9adcaf6a05f3ef47b4759328d 100644 (file)
@@ -339,8 +339,7 @@ static void au1xpsc_i2s_remove(struct platform_device *pdev,
        au1xpsc_i2s_workdata = NULL;
 }
 
-static int au1xpsc_i2s_suspend(struct platform_device *pdev,
-                              struct snd_soc_dai *cpu_dai)
+static int au1xpsc_i2s_suspend(struct snd_soc_dai *cpu_dai)
 {
        /* save interesting register and disable PSC */
        au1xpsc_i2s_workdata->pm[0] =
@@ -354,8 +353,7 @@ static int au1xpsc_i2s_suspend(struct platform_device *pdev,
        return 0;
 }
 
-static int au1xpsc_i2s_resume(struct platform_device *pdev,
-                             struct snd_soc_dai *cpu_dai)
+static int au1xpsc_i2s_resume(struct snd_soc_dai *cpu_dai)
 {
        /* select I2S mode and PSC clock */
        au_writel(PSC_CTRL_DISABLE, PSC_CTRL(au1xpsc_i2s_workdata));
index 709bdf08e398f2fa57c6147f7323acc036fb0e09..c602ce109d52016ec4ab656f0bf2ca61536beb4a 100644 (file)
@@ -269,8 +269,7 @@ struct snd_ac97_bus_ops soc_ac97_ops = {
 EXPORT_SYMBOL_GPL(soc_ac97_ops);
 
 #ifdef CONFIG_PM
-static int bf5xx_ac97_suspend(struct platform_device *pdev,
-       struct snd_soc_dai *dai)
+static int bf5xx_ac97_suspend(struct snd_soc_dai *dai)
 {
        struct sport_device *sport =
                (struct sport_device *)dai->private_data;
@@ -285,8 +284,7 @@ static int bf5xx_ac97_suspend(struct platform_device *pdev,
        return 0;
 }
 
-static int bf5xx_ac97_resume(struct platform_device *pdev,
-       struct snd_soc_dai *dai)
+static int bf5xx_ac97_resume(struct snd_soc_dai *dai)
 {
        int ret;
        struct sport_device *sport =
index 6e5036bf9245ddb68fc20aff961dc9a293aea1af..9f8ce87cc6c681b9cb15203deb2c5a1f790b8797 100644 (file)
@@ -222,16 +222,14 @@ static int bf5xx_i2s_probe(struct platform_device *pdev,
        return 0;
 }
 
-static void bf5xx_i2s_remove(struct platform_device *pdev,
-                          struct snd_soc_dai *dai)
+static void bf5xx_i2s_remove(struct snd_soc_dai *dai)
 {
        pr_debug("%s enter\n", __func__);
        peripheral_free_list(&sport_req[sport_num][0]);
 }
 
 #ifdef CONFIG_PM
-static int bf5xx_i2s_suspend(struct platform_device *dev,
-                            struct snd_soc_dai *dai)
+static int bf5xx_i2s_suspend(struct snd_soc_dai *dai)
 {
        struct sport_device *sport =
                (struct sport_device *)dai->private_data;
index 402fc5ba65e72e95fd5a98a5c93228e525026f99..73fa10defccaed1d6a68ffaf1ca2e0e0642014b2 100644 (file)
@@ -244,8 +244,7 @@ static void pxa_ssp_shutdown(struct snd_pcm_substream *substream,
 
 #ifdef CONFIG_PM
 
-static int pxa_ssp_suspend(struct platform_device *pdev,
-       struct snd_soc_dai *cpu_dai)
+static int pxa_ssp_suspend(struct snd_soc_dai *cpu_dai)
 {
        struct ssp_priv *priv = cpu_dai->private_data;
 
@@ -257,8 +256,7 @@ static int pxa_ssp_suspend(struct platform_device *pdev,
        return 0;
 }
 
-static int pxa_ssp_resume(struct platform_device *pdev,
-       struct snd_soc_dai *cpu_dai)
+static int pxa_ssp_resume(struct snd_soc_dai *cpu_dai)
 {
        struct ssp_priv *priv = cpu_dai->private_data;
 
index bffbe288634cc28667e516b4127dc786cac46f5f..8eed80d5675d28d3ac7fc3d5f20164d9fc8191ed 100644 (file)
@@ -87,14 +87,12 @@ static struct pxa2xx_pcm_dma_params pxa2xx_ac97_pcm_mic_mono_in = {
 };
 
 #ifdef CONFIG_PM
-static int pxa2xx_ac97_suspend(struct platform_device *pdev,
-       struct snd_soc_dai *dai)
+static int pxa2xx_ac97_suspend(struct snd_soc_dai *dai)
 {
        return pxa2xx_ac97_hw_suspend();
 }
 
-static int pxa2xx_ac97_resume(struct platform_device *pdev,
-       struct snd_soc_dai *dai)
+static int pxa2xx_ac97_resume(struct snd_soc_dai *dai)
 {
        return pxa2xx_ac97_hw_resume();
 }
index f9a9e2ebafa1e0440439462cd3f43c80d1205914..314973ace6dc99af2a63ddfd64923fa052a90b0d 100644 (file)
@@ -293,8 +293,7 @@ static void pxa2xx_i2s_shutdown(struct snd_pcm_substream *substream,
 }
 
 #ifdef CONFIG_PM
-static int pxa2xx_i2s_suspend(struct platform_device *dev,
-       struct snd_soc_dai *dai)
+static int pxa2xx_i2s_suspend(struct snd_soc_dai *dai)
 {
        if (!dai->active)
                return 0;
@@ -311,8 +310,7 @@ static int pxa2xx_i2s_suspend(struct platform_device *dev,
        return 0;
 }
 
-static int pxa2xx_i2s_resume(struct platform_device *pdev,
-       struct snd_soc_dai *dai)
+static int pxa2xx_i2s_resume(struct snd_soc_dai *dai)
 {
        if (!dai->active)
                return 0;
index 1c741047ae35546765ae96e18aa78091cf768aaa..75f87c3c74d03b0c70f8740b240b58586374fc4b 100644 (file)
@@ -649,8 +649,7 @@ static int s3c2412_i2s_probe(struct platform_device *pdev,
 }
 
 #ifdef CONFIG_PM
-static int s3c2412_i2s_suspend(struct platform_device *dev,
-                             struct snd_soc_dai *dai)
+static int s3c2412_i2s_suspend(struct snd_soc_dai *dai)
 {
        struct s3c2412_i2s_info *i2s = &s3c2412_i2s;
        u32 iismod;
@@ -665,25 +664,24 @@ static int s3c2412_i2s_suspend(struct platform_device *dev,
                iismod = readl(i2s->regs + S3C2412_IISMOD);
 
                if (iismod & S3C2412_IISCON_RXDMA_ACTIVE)
-                       dev_warn(&dev->dev, "%s: RXDMA active?\n", __func__);
+                       pr_warning("%s: RXDMA active?\n", __func__);
 
                if (iismod & S3C2412_IISCON_TXDMA_ACTIVE)
-                       dev_warn(&dev->dev, "%s: TXDMA active?\n", __func__);
+                       pr_warning("%s: TXDMA active?\n", __func__);
 
                if (iismod & S3C2412_IISCON_IIS_ACTIVE)
-                       dev_warn(&dev->dev, "%s: IIS active\n", __func__);
+                       pr_warning("%s: IIS active\n", __func__);
        }
 
        return 0;
 }
 
-static int s3c2412_i2s_resume(struct platform_device *pdev,
-                             struct snd_soc_dai *dai)
+static int s3c2412_i2s_resume(struct snd_soc_dai *dai)
 {
        struct s3c2412_i2s_info *i2s = &s3c2412_i2s;
 
-       dev_info(&pdev->dev, "dai_active %d, IISMOD %08x, IISCON %08x\n",
-                dai->active, i2s->suspend_iismod, i2s->suspend_iiscon);
+       pr_info("dai_active %d, IISMOD %08x, IISCON %08x\n",
+               dai->active, i2s->suspend_iismod, i2s->suspend_iiscon);
 
        if (dai->active) {
                writel(i2s->suspend_iiscon, i2s->regs + S3C2412_IISCON);
index 8d9135f41bc9e4c7d7f7ef15aec57c4e3532ef2b..45fe8f7c88abec2aef1186822e5acb5df796b5e3 100644 (file)
@@ -419,8 +419,7 @@ static int s3c24xx_i2s_probe(struct platform_device *pdev,
 }
 
 #ifdef CONFIG_PM
-static int s3c24xx_i2s_suspend(struct platform_device *pdev,
-               struct snd_soc_dai *cpu_dai)
+static int s3c24xx_i2s_suspend(struct snd_soc_dai *cpu_dai)
 {
        DBG("Entered %s\n", __func__);
 
@@ -434,8 +433,7 @@ static int s3c24xx_i2s_suspend(struct platform_device *pdev,
        return 0;
 }
 
-static int s3c24xx_i2s_resume(struct platform_device *pdev,
-               struct snd_soc_dai *cpu_dai)
+static int s3c24xx_i2s_resume(struct snd_soc_dai *cpu_dai)
 {
        DBG("Entered %s\n", __func__);
        clk_enable(s3c24xx_i2s.iis_clk);
index f83852f11463c136337fff7e727134c2abbf9147..2f2a8d93bbf09f2cd7cf7ed87974493b52a69a8a 100644 (file)
@@ -650,7 +650,7 @@ static int soc_suspend(struct platform_device *pdev, pm_message_t state)
        for (i = 0; i < card->num_links; i++) {
                struct snd_soc_dai  *cpu_dai = card->dai_link[i].cpu_dai;
                if (cpu_dai->suspend && !cpu_dai->ac97_control)
-                       cpu_dai->suspend(pdev, cpu_dai);
+                       cpu_dai->suspend(cpu_dai);
                if (platform->suspend)
                        platform->suspend(cpu_dai);
        }
@@ -676,7 +676,7 @@ static int soc_suspend(struct platform_device *pdev, pm_message_t state)
        for (i = 0; i < card->num_links; i++) {
                struct snd_soc_dai *cpu_dai = card->dai_link[i].cpu_dai;
                if (cpu_dai->suspend && cpu_dai->ac97_control)
-                       cpu_dai->suspend(pdev, cpu_dai);
+                       cpu_dai->suspend(cpu_dai);
        }
 
        if (card->suspend_post)
@@ -712,7 +712,7 @@ static void soc_resume_deferred(struct work_struct *work)
        for (i = 0; i < card->num_links; i++) {
                struct snd_soc_dai *cpu_dai = card->dai_link[i].cpu_dai;
                if (cpu_dai->resume && cpu_dai->ac97_control)
-                       cpu_dai->resume(pdev, cpu_dai);
+                       cpu_dai->resume(cpu_dai);
        }
 
        if (codec_dev->resume)
@@ -739,7 +739,7 @@ static void soc_resume_deferred(struct work_struct *work)
        for (i = 0; i < card->num_links; i++) {
                struct snd_soc_dai *cpu_dai = card->dai_link[i].cpu_dai;
                if (cpu_dai->resume && !cpu_dai->ac97_control)
-                       cpu_dai->resume(pdev, cpu_dai);
+                       cpu_dai->resume(cpu_dai);
                if (platform->resume)
                        platform->resume(cpu_dai);
        }