Arnd Bergmann <[email protected]> writes: > 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 <[email protected]> > Cc: Rafael J. Wysocki <[email protected]> > Cc: Takashi Iwai <[email protected]> > Cc: Laxman Dewangan <[email protected]> > --- > drivers/char/hw_random/omap-rng.c | 2 +-
For the OMAP change, Acked-by: Kevin Hilman <[email protected]> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

