Commit dc7d7b830ee1f4111696e73d1c25da683b461548

Authored by Mark Brown
1 parent 07c84d0409

ASoC: Remove platform device from DAI suspend and resume operations

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>

Showing 12 changed files with 31 additions and 53 deletions Side-by-side Diff

include/sound/soc-dai.h
... ... @@ -191,10 +191,8 @@
191 191 struct snd_soc_dai *dai);
192 192 void (*remove)(struct platform_device *pdev,
193 193 struct snd_soc_dai *dai);
194   - int (*suspend)(struct platform_device *pdev,
195   - struct snd_soc_dai *dai);
196   - int (*resume)(struct platform_device *pdev,
197   - struct snd_soc_dai *dai);
  194 + int (*suspend)(struct snd_soc_dai *dai);
  195 + int (*resume)(struct snd_soc_dai *dai);
198 196  
199 197 /* ops */
200 198 struct snd_soc_dai_ops ops;
sound/soc/atmel/atmel_ssc_dai.c
... ... @@ -628,8 +628,7 @@
628 628  
629 629  
630 630 #ifdef CONFIG_PM
631   -static int atmel_ssc_suspend(struct platform_device *pdev,
632   - struct snd_soc_dai *cpu_dai)
  631 +static int atmel_ssc_suspend(struct snd_soc_dai *cpu_dai)
633 632 {
634 633 struct atmel_ssc_info *ssc_p;
635 634  
... ... @@ -657,8 +656,7 @@
657 656  
658 657  
659 658  
660   -static int atmel_ssc_resume(struct platform_device *pdev,
661   - struct snd_soc_dai *cpu_dai)
  659 +static int atmel_ssc_resume(struct snd_soc_dai *cpu_dai)
662 660 {
663 661 struct atmel_ssc_info *ssc_p;
664 662 u32 cr;
sound/soc/au1x/psc-ac97.c
... ... @@ -314,8 +314,7 @@
314 314 au1xpsc_ac97_workdata = NULL;
315 315 }
316 316  
317   -static int au1xpsc_ac97_suspend(struct platform_device *pdev,
318   - struct snd_soc_dai *dai)
  317 +static int au1xpsc_ac97_suspend(struct snd_soc_dai *dai)
319 318 {
320 319 /* save interesting registers and disable PSC */
321 320 au1xpsc_ac97_workdata->pm[0] =
... ... @@ -329,8 +328,7 @@
329 328 return 0;
330 329 }
331 330  
332   -static int au1xpsc_ac97_resume(struct platform_device *pdev,
333   - struct snd_soc_dai *dai)
  331 +static int au1xpsc_ac97_resume(struct snd_soc_dai *dai)
334 332 {
335 333 /* restore PSC clock config */
336 334 au_writel(au1xpsc_ac97_workdata->pm[0] | PSC_SEL_PS_AC97MODE,
sound/soc/au1x/psc-i2s.c
... ... @@ -339,8 +339,7 @@
339 339 au1xpsc_i2s_workdata = NULL;
340 340 }
341 341  
342   -static int au1xpsc_i2s_suspend(struct platform_device *pdev,
343   - struct snd_soc_dai *cpu_dai)
  342 +static int au1xpsc_i2s_suspend(struct snd_soc_dai *cpu_dai)
344 343 {
345 344 /* save interesting register and disable PSC */
346 345 au1xpsc_i2s_workdata->pm[0] =
... ... @@ -354,8 +353,7 @@
354 353 return 0;
355 354 }
356 355  
357   -static int au1xpsc_i2s_resume(struct platform_device *pdev,
358   - struct snd_soc_dai *cpu_dai)
  356 +static int au1xpsc_i2s_resume(struct snd_soc_dai *cpu_dai)
359 357 {
360 358 /* select I2S mode and PSC clock */
361 359 au_writel(PSC_CTRL_DISABLE, PSC_CTRL(au1xpsc_i2s_workdata));
sound/soc/blackfin/bf5xx-ac97.c
... ... @@ -269,8 +269,7 @@
269 269 EXPORT_SYMBOL_GPL(soc_ac97_ops);
270 270  
271 271 #ifdef CONFIG_PM
272   -static int bf5xx_ac97_suspend(struct platform_device *pdev,
273   - struct snd_soc_dai *dai)
  272 +static int bf5xx_ac97_suspend(struct snd_soc_dai *dai)
274 273 {
275 274 struct sport_device *sport =
276 275 (struct sport_device *)dai->private_data;
... ... @@ -285,8 +284,7 @@
285 284 return 0;
286 285 }
287 286  
288   -static int bf5xx_ac97_resume(struct platform_device *pdev,
289   - struct snd_soc_dai *dai)
  287 +static int bf5xx_ac97_resume(struct snd_soc_dai *dai)
290 288 {
291 289 int ret;
292 290 struct sport_device *sport =
sound/soc/blackfin/bf5xx-i2s.c
... ... @@ -222,16 +222,14 @@
222 222 return 0;
223 223 }
224 224  
225   -static void bf5xx_i2s_remove(struct platform_device *pdev,
226   - struct snd_soc_dai *dai)
  225 +static void bf5xx_i2s_remove(struct snd_soc_dai *dai)
227 226 {
228 227 pr_debug("%s enter\n", __func__);
229 228 peripheral_free_list(&sport_req[sport_num][0]);
230 229 }
231 230  
232 231 #ifdef CONFIG_PM
233   -static int bf5xx_i2s_suspend(struct platform_device *dev,
234   - struct snd_soc_dai *dai)
  232 +static int bf5xx_i2s_suspend(struct snd_soc_dai *dai)
235 233 {
236 234 struct sport_device *sport =
237 235 (struct sport_device *)dai->private_data;
sound/soc/pxa/pxa-ssp.c
... ... @@ -244,8 +244,7 @@
244 244  
245 245 #ifdef CONFIG_PM
246 246  
247   -static int pxa_ssp_suspend(struct platform_device *pdev,
248   - struct snd_soc_dai *cpu_dai)
  247 +static int pxa_ssp_suspend(struct snd_soc_dai *cpu_dai)
249 248 {
250 249 struct ssp_priv *priv = cpu_dai->private_data;
251 250  
... ... @@ -257,8 +256,7 @@
257 256 return 0;
258 257 }
259 258  
260   -static int pxa_ssp_resume(struct platform_device *pdev,
261   - struct snd_soc_dai *cpu_dai)
  259 +static int pxa_ssp_resume(struct snd_soc_dai *cpu_dai)
262 260 {
263 261 struct ssp_priv *priv = cpu_dai->private_data;
264 262  
sound/soc/pxa/pxa2xx-ac97.c
... ... @@ -87,14 +87,12 @@
87 87 };
88 88  
89 89 #ifdef CONFIG_PM
90   -static int pxa2xx_ac97_suspend(struct platform_device *pdev,
91   - struct snd_soc_dai *dai)
  90 +static int pxa2xx_ac97_suspend(struct snd_soc_dai *dai)
92 91 {
93 92 return pxa2xx_ac97_hw_suspend();
94 93 }
95 94  
96   -static int pxa2xx_ac97_resume(struct platform_device *pdev,
97   - struct snd_soc_dai *dai)
  95 +static int pxa2xx_ac97_resume(struct snd_soc_dai *dai)
98 96 {
99 97 return pxa2xx_ac97_hw_resume();
100 98 }
sound/soc/pxa/pxa2xx-i2s.c
... ... @@ -293,8 +293,7 @@
293 293 }
294 294  
295 295 #ifdef CONFIG_PM
296   -static int pxa2xx_i2s_suspend(struct platform_device *dev,
297   - struct snd_soc_dai *dai)
  296 +static int pxa2xx_i2s_suspend(struct snd_soc_dai *dai)
298 297 {
299 298 if (!dai->active)
300 299 return 0;
... ... @@ -311,8 +310,7 @@
311 310 return 0;
312 311 }
313 312  
314   -static int pxa2xx_i2s_resume(struct platform_device *pdev,
315   - struct snd_soc_dai *dai)
  313 +static int pxa2xx_i2s_resume(struct snd_soc_dai *dai)
316 314 {
317 315 if (!dai->active)
318 316 return 0;
sound/soc/s3c24xx/s3c2412-i2s.c
... ... @@ -649,8 +649,7 @@
649 649 }
650 650  
651 651 #ifdef CONFIG_PM
652   -static int s3c2412_i2s_suspend(struct platform_device *dev,
653   - struct snd_soc_dai *dai)
  652 +static int s3c2412_i2s_suspend(struct snd_soc_dai *dai)
654 653 {
655 654 struct s3c2412_i2s_info *i2s = &s3c2412_i2s;
656 655 u32 iismod;
657 656  
658 657  
659 658  
660 659  
... ... @@ -665,25 +664,24 @@
665 664 iismod = readl(i2s->regs + S3C2412_IISMOD);
666 665  
667 666 if (iismod & S3C2412_IISCON_RXDMA_ACTIVE)
668   - dev_warn(&dev->dev, "%s: RXDMA active?\n", __func__);
  667 + pr_warning("%s: RXDMA active?\n", __func__);
669 668  
670 669 if (iismod & S3C2412_IISCON_TXDMA_ACTIVE)
671   - dev_warn(&dev->dev, "%s: TXDMA active?\n", __func__);
  670 + pr_warning("%s: TXDMA active?\n", __func__);
672 671  
673 672 if (iismod & S3C2412_IISCON_IIS_ACTIVE)
674   - dev_warn(&dev->dev, "%s: IIS active\n", __func__);
  673 + pr_warning("%s: IIS active\n", __func__);
675 674 }
676 675  
677 676 return 0;
678 677 }
679 678  
680   -static int s3c2412_i2s_resume(struct platform_device *pdev,
681   - struct snd_soc_dai *dai)
  679 +static int s3c2412_i2s_resume(struct snd_soc_dai *dai)
682 680 {
683 681 struct s3c2412_i2s_info *i2s = &s3c2412_i2s;
684 682  
685   - dev_info(&pdev->dev, "dai_active %d, IISMOD %08x, IISCON %08x\n",
686   - dai->active, i2s->suspend_iismod, i2s->suspend_iiscon);
  683 + pr_info("dai_active %d, IISMOD %08x, IISCON %08x\n",
  684 + dai->active, i2s->suspend_iismod, i2s->suspend_iiscon);
687 685  
688 686 if (dai->active) {
689 687 writel(i2s->suspend_iiscon, i2s->regs + S3C2412_IISCON);
sound/soc/s3c24xx/s3c24xx-i2s.c
... ... @@ -419,8 +419,7 @@
419 419 }
420 420  
421 421 #ifdef CONFIG_PM
422   -static int s3c24xx_i2s_suspend(struct platform_device *pdev,
423   - struct snd_soc_dai *cpu_dai)
  422 +static int s3c24xx_i2s_suspend(struct snd_soc_dai *cpu_dai)
424 423 {
425 424 DBG("Entered %s\n", __func__);
426 425  
... ... @@ -434,8 +433,7 @@
434 433 return 0;
435 434 }
436 435  
437   -static int s3c24xx_i2s_resume(struct platform_device *pdev,
438   - struct snd_soc_dai *cpu_dai)
  436 +static int s3c24xx_i2s_resume(struct snd_soc_dai *cpu_dai)
439 437 {
440 438 DBG("Entered %s\n", __func__);
441 439 clk_enable(s3c24xx_i2s.iis_clk);
sound/soc/soc-core.c
... ... @@ -650,7 +650,7 @@
650 650 for (i = 0; i < card->num_links; i++) {
651 651 struct snd_soc_dai *cpu_dai = card->dai_link[i].cpu_dai;
652 652 if (cpu_dai->suspend && !cpu_dai->ac97_control)
653   - cpu_dai->suspend(pdev, cpu_dai);
  653 + cpu_dai->suspend(cpu_dai);
654 654 if (platform->suspend)
655 655 platform->suspend(cpu_dai);
656 656 }
... ... @@ -676,7 +676,7 @@
676 676 for (i = 0; i < card->num_links; i++) {
677 677 struct snd_soc_dai *cpu_dai = card->dai_link[i].cpu_dai;
678 678 if (cpu_dai->suspend && cpu_dai->ac97_control)
679   - cpu_dai->suspend(pdev, cpu_dai);
  679 + cpu_dai->suspend(cpu_dai);
680 680 }
681 681  
682 682 if (card->suspend_post)
... ... @@ -712,7 +712,7 @@
712 712 for (i = 0; i < card->num_links; i++) {
713 713 struct snd_soc_dai *cpu_dai = card->dai_link[i].cpu_dai;
714 714 if (cpu_dai->resume && cpu_dai->ac97_control)
715   - cpu_dai->resume(pdev, cpu_dai);
  715 + cpu_dai->resume(cpu_dai);
716 716 }
717 717  
718 718 if (codec_dev->resume)
... ... @@ -739,7 +739,7 @@
739 739 for (i = 0; i < card->num_links; i++) {
740 740 struct snd_soc_dai *cpu_dai = card->dai_link[i].cpu_dai;
741 741 if (cpu_dai->resume && !cpu_dai->ac97_control)
742   - cpu_dai->resume(pdev, cpu_dai);
  742 + cpu_dai->resume(cpu_dai);
743 743 if (platform->resume)
744 744 platform->resume(cpu_dai);
745 745 }