diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-11-24 21:31:28 +0200 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2023-12-07 13:50:29 +0000 |
commit | fd58bb8c7da3c2d4314d7ab76402ca18e9cc0afa (patch) | |
tree | a36c747a3e0938785dd3f53d0e4377df2af7bfc8 /drivers/mfd/intel-lpss.h | |
parent | 24ee97a9e816a333688141eed2fbbb2d5e60b5d1 (diff) |
mfd: intel-lpss: Provide Intel LPSS PM ops structure
With the help of EXPORT_NS_GPL_DEV_PM_OPS() and other *_PM_OPS() macros
we may convert PM ops functions to become static. This also takes into
account the PM configuration options such as CONFIG_PM and CONFIG_PM_SLEEP.
This all removes a lot of ugly macros and ifdeffery in the driver.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20231124200258.3682979-6-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/mfd/intel-lpss.h')
-rw-r--r-- | drivers/mfd/intel-lpss.h | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/drivers/mfd/intel-lpss.h b/drivers/mfd/intel-lpss.h index 062ce95b68b9..c1d72b117ed5 100644 --- a/drivers/mfd/intel-lpss.h +++ b/drivers/mfd/intel-lpss.h @@ -30,32 +30,6 @@ int intel_lpss_probe(struct device *dev, const struct intel_lpss_platform_info *info); void intel_lpss_remove(struct device *dev); -#ifdef CONFIG_PM -int intel_lpss_prepare(struct device *dev); -int intel_lpss_suspend(struct device *dev); -int intel_lpss_resume(struct device *dev); - -#ifdef CONFIG_PM_SLEEP -#define INTEL_LPSS_SLEEP_PM_OPS \ - .prepare = intel_lpss_prepare, \ - SET_LATE_SYSTEM_SLEEP_PM_OPS(intel_lpss_suspend, intel_lpss_resume) -#else -#define INTEL_LPSS_SLEEP_PM_OPS -#endif - -#define INTEL_LPSS_RUNTIME_PM_OPS \ - .runtime_suspend = intel_lpss_suspend, \ - .runtime_resume = intel_lpss_resume, - -#else /* !CONFIG_PM */ -#define INTEL_LPSS_SLEEP_PM_OPS -#define INTEL_LPSS_RUNTIME_PM_OPS -#endif /* CONFIG_PM */ - -#define INTEL_LPSS_PM_OPS(name) \ -const struct dev_pm_ops name = { \ - INTEL_LPSS_SLEEP_PM_OPS \ - INTEL_LPSS_RUNTIME_PM_OPS \ -} +extern const struct dev_pm_ops intel_lpss_pm_ops; #endif /* __MFD_INTEL_LPSS_H */ |