diff options
author | Paul Cercueil <paul@crapouillou.net> | 2022-10-23 12:48:30 +0300 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2022-12-07 16:28:11 +0300 |
commit | 245cb473e5388fcbc01c7284b6a4e1446cdbf054 (patch) | |
tree | cffcf73611d49490e940bed66c06bbf5562d9ff4 /include/linux/mfd/pcf50633 | |
parent | e1243e0d72185c257ac2cdde1bbba130e24acf9a (diff) | |
download | linux-245cb473e5388fcbc01c7284b6a4e1446cdbf054.tar.xz |
mfd: pcf50633: Remove #ifdef guards for PM related functions
Use the new EXPORT_GPL_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros
to handle the .suspend/.resume callbacks.
These macros allow the suspend and resume functions to be automatically
dropped by the compiler when CONFIG_SUSPEND is disabled, without having
to use #ifdef guards.
This has the advantage of always compiling these functions in,
independently of any Kconfig option. Thanks to that, bugs and other
regressions are subsequently easier to catch.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'include/linux/mfd/pcf50633')
-rw-r--r-- | include/linux/mfd/pcf50633/core.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/mfd/pcf50633/core.h b/include/linux/mfd/pcf50633/core.h index 3f752dc62a6c..539f27f8bd89 100644 --- a/include/linux/mfd/pcf50633/core.h +++ b/include/linux/mfd/pcf50633/core.h @@ -13,6 +13,7 @@ #include <linux/workqueue.h> #include <linux/regulator/driver.h> #include <linux/regulator/machine.h> +#include <linux/pm.h> #include <linux/power_supply.h> #include <linux/mfd/pcf50633/backlight.h> @@ -226,9 +227,6 @@ static inline struct pcf50633 *dev_to_pcf50633(struct device *dev) int pcf50633_irq_init(struct pcf50633 *pcf, int irq); void pcf50633_irq_free(struct pcf50633 *pcf); -#ifdef CONFIG_PM -int pcf50633_irq_suspend(struct pcf50633 *pcf); -int pcf50633_irq_resume(struct pcf50633 *pcf); -#endif +extern const struct dev_pm_ops pcf50633_pm; #endif |