Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d34e4e00 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: platform: Check CONFIG_PM_SLEEP instead of CONFIG_PM



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: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 94c142a1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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)
{
@@ -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
	},
+1 −1
Original line number Diff line number Diff line
@@ -534,7 +534,7 @@ out_put_pclk:
	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);
+1 −1
Original line number Diff line number Diff line
@@ -1134,7 +1134,7 @@ err_snd_card_new:
	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);
+1 −1
Original line number Diff line number Diff line
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -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);
Loading