Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mfd: intel-lpss: Hide suspend/resume functions in #ifdef

When CONFIG_PM is disabled, the prototypes for these two functions
are not visible:

drivers/mfd/intel-lpss.c:482:5: error: no previous prototype for 'intel_lpss_suspend' [-Werror=missing-prototypes]
482 | int intel_lpss_suspend(struct device *dev)
| ^~~~~~~~~~~~~~~~~~
drivers/mfd/intel-lpss.c:503:5: error: no previous prototype for 'intel_lpss_resume' [-Werror=missing-prototypes]
503 | int intel_lpss_resume(struct device *dev)

Add the same #ifdef around the definition of the unused functions,
which avoids the warning and slightly reduces the code size.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20230516202746.561111-1-arnd@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Arnd Bergmann and committed by
Lee Jones
9ef18aa8 e83152a8

+2
+2
drivers/mfd/intel-lpss.c
··· 460 460 } 461 461 EXPORT_SYMBOL_GPL(intel_lpss_remove); 462 462 463 + #ifdef CONFIG_PM 463 464 static int resume_lpss_device(struct device *dev, void *data) 464 465 { 465 466 if (!dev_pm_test_driver_flags(dev, DPM_FLAG_SMART_SUSPEND)) ··· 515 514 return 0; 516 515 } 517 516 EXPORT_SYMBOL_GPL(intel_lpss_resume); 517 + #endif 518 518 519 519 static int __init intel_lpss_init(void) 520 520 {