ASoC: Remove snd_soc_platform_driver suspend/resume callbacks
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 3 Nov 2014 09:31:47 +0000 (10:31 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 3 Nov 2014 12:17:07 +0000 (12:17 +0000)
Those are unused and new drivers should use device driver suspend/resume.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc.h
sound/soc/soc-core.c

index ad47e9660b2212ef6493f0a0c06bbfdec5305cd9..edbb07ba4cb509fcbf0b3df1ce1038a29680e6bc 100644 (file)
@@ -857,8 +857,6 @@ struct snd_soc_platform_driver {
 
        int (*probe)(struct snd_soc_platform *);
        int (*remove)(struct snd_soc_platform *);
-       int (*suspend)(struct snd_soc_dai *dai);
-       int (*resume)(struct snd_soc_dai *dai);
        struct snd_soc_component_driver component_driver;
 
        /* pcm creation and destruction */
@@ -891,8 +889,6 @@ struct snd_soc_platform {
        struct device *dev;
        const struct snd_soc_platform_driver *driver;
 
-       unsigned int suspended:1; /* platform is suspended */
-
        struct list_head list;
 
        struct snd_soc_component component;
index a2b51edf6d83832a49a7562eede4db66d4620e94..0509d726759d746f3e7f59a027a188fba891b5ce 100644 (file)
@@ -592,17 +592,12 @@ int snd_soc_suspend(struct device *dev)
 
        for (i = 0; i < card->num_rtd; i++) {
                struct snd_soc_dai *cpu_dai = card->rtd[i].cpu_dai;
-               struct snd_soc_platform *platform = card->rtd[i].platform;
 
                if (card->rtd[i].dai_link->ignore_suspend)
                        continue;
 
                if (cpu_dai->driver->suspend && !cpu_dai->driver->ac97_control)
                        cpu_dai->driver->suspend(cpu_dai);
-               if (platform->driver->suspend && !platform->suspended) {
-                       platform->driver->suspend(cpu_dai);
-                       platform->suspended = 1;
-               }
        }
 
        /* close any waiting streams and save state */
@@ -775,17 +770,12 @@ static void soc_resume_deferred(struct work_struct *work)
 
        for (i = 0; i < card->num_rtd; i++) {
                struct snd_soc_dai *cpu_dai = card->rtd[i].cpu_dai;
-               struct snd_soc_platform *platform = card->rtd[i].platform;
 
                if (card->rtd[i].dai_link->ignore_suspend)
                        continue;
 
                if (cpu_dai->driver->resume && !cpu_dai->driver->ac97_control)
                        cpu_dai->driver->resume(cpu_dai);
-               if (platform->driver->resume && platform->suspended) {
-                       platform->driver->resume(cpu_dai);
-                       platform->suspended = 0;
-               }
        }
 
        if (card->resume_post)