Skip to content

Commit

Permalink
ALSA: platform: Check CONFIG_PM_SLEEP instead of CONFIG_PM
Browse files Browse the repository at this point in the history
When CONFIG_PM is set but CONFIG_PM_SLEEP is unset,
SIMPLE_DEV_PM_OPS() ignores the given functions, and this leads to
compile warnings.

For avoiding this, simply check CONFIG_PM_SLEEP instead of CONFIG_PM.

Reported-by: Arnd Bergmann <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Aug 9, 2012
1 parent 94c142a commit d34e4e0
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions sound/arm/pxa2xx-ac97.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ static struct pxa2xx_pcm_client pxa2xx_ac97_pcm_client = {
.prepare = pxa2xx_ac97_pcm_prepare,
};

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP

static int pxa2xx_ac97_do_suspend(struct snd_card *card)
{
Expand Down Expand Up @@ -243,7 +243,7 @@ static struct platform_driver pxa2xx_ac97_driver = {
.driver = {
.name = "pxa2xx-ac97",
.owner = THIS_MODULE,
#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
.pm = &pxa2xx_ac97_pm_ops,
#endif
},
Expand Down
2 changes: 1 addition & 1 deletion sound/atmel/abdac.c
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ static int __devinit atmel_abdac_probe(struct platform_device *pdev)
return retval;
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static int atmel_abdac_suspend(struct device *pdev)
{
struct snd_card *card = dev_get_drvdata(pdev);
Expand Down
2 changes: 1 addition & 1 deletion sound/atmel/ac97c.c
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,7 @@ static int __devinit atmel_ac97c_probe(struct platform_device *pdev)
return retval;
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static int atmel_ac97c_suspend(struct device *pdev)
{
struct snd_card *card = dev_get_drvdata(pdev);
Expand Down
2 changes: 1 addition & 1 deletion sound/drivers/aloop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,7 @@ static int __devexit loopback_remove(struct platform_device *devptr)
return 0;
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static int loopback_suspend(struct device *pdev)
{
struct snd_card *card = dev_get_drvdata(pdev);
Expand Down
2 changes: 1 addition & 1 deletion sound/drivers/dummy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@ static int __devexit snd_dummy_remove(struct platform_device *devptr)
return 0;
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static int snd_dummy_suspend(struct device *pdev)
{
struct snd_card *card = dev_get_drvdata(pdev);
Expand Down
4 changes: 2 additions & 2 deletions sound/drivers/pcsp/pcsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ static void pcsp_stop_beep(struct snd_pcsp *chip)
pcspkr_stop_sound();
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static int pcsp_suspend(struct device *dev)
{
struct snd_pcsp *chip = dev_get_drvdata(dev);
Expand All @@ -212,7 +212,7 @@ static SIMPLE_DEV_PM_OPS(pcsp_pm, pcsp_suspend, NULL);
#define PCSP_PM_OPS &pcsp_pm
#else
#define PCSP_PM_OPS NULL
#endif /* CONFIG_PM */
#endif /* CONFIG_PM_SLEEP */

static void pcsp_shutdown(struct platform_device *dev)
{
Expand Down
2 changes: 1 addition & 1 deletion sound/ppc/powermac.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ static int __devexit snd_pmac_remove(struct platform_device *devptr)
return 0;
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static int snd_pmac_driver_suspend(struct device *dev)
{
struct snd_card *card = dev_get_drvdata(dev);
Expand Down

0 comments on commit d34e4e0

Please sign in to comment.