summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-08-04 07:11:34 +0000
committerArnd Bergmann <arnd@arndb.de>2012-08-13 13:40:57 +0000
commit7b4959e6cbb9d409e79a5aaaa4b75a0ee13e5617 (patch)
treefe5f21d33d171e027889df481a444a42b374587b /sound
parentfc20880010d2e207be2ceb8ea3535dd64ad069f4 (diff)
pm/drivers: fix use of SIMPLE_DEV_PM_OPS
A few drivers use a construct like #ifdef CONFIG_PM static int foo_suspend(struct device *pdev) { ... } static int foo_resume struct device *pdev) { ... } #endif static SIMPLE_DEV_PM_OPS(foo_pm, foo_suspend, foo_resume); which leaves the two functions unused if CONFIG_PM is enabled but CONFIG_PM_SLEEP is disabled. I found this while building all defconfig files on ARM. It's not clear to me if this is the right solution, but at least it makes the code consistent again. Without this patch, building omap1_defconfig results in: drivers/char/hw_random/omap-rng.c:165:12: warning: 'omap_rng_suspend' defined but not used [-Wunused-function] drivers/char/hw_random/omap-rng.c:171:12: warning: 'omap_rng_resume' defined but not used [-Wunused-function] sound/drivers/dummy.c:1068:12: warning: 'snd_dummy_suspend' defined but not used [-Wunused-function] sound/drivers/dummy.c:1078:12: warning: 'snd_dummy_resume' defined but not used [-Wunused-function] and building tegra_defconfig results in: drivers/i2c/busses/i2c-tegra.c:716:12: warning: 'tegra_i2c_suspend' defined but not used [-Wunused-function] drivers/i2c/busses/i2c-tegra.c:727:12: warning: 'tegra_i2c_resume' defined but not used [-Wunused-function] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Rafael J. Wysocki <rjw@sisk.pl> Cc: Takashi Iwai <tiwai@suse.de> Cc: Laxman Dewangan <ldewangan@nvidia.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/drivers/dummy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c
index f7d3bfc6bca8..54bb6644a598 100644
--- a/sound/drivers/dummy.c
+++ b/sound/drivers/dummy.c
@@ -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);