[PATCH for-next v2 00/10] Fix symbol export for _SIMPLE_ variants of _PM_OPS()

From: Raag Jadav
Date: Mon Sep 18 2023 - 04:11:29 EST


Currently EXPORT_*_SIMPLE_DEV_PM_OPS() use EXPORT_*_DEV_PM_OPS() set of
macros to export dev_pm_ops symbol, which export the symbol in case
CONFIG_PM=y but don't take CONFIG_PM_SLEEP into consideration.

Since _SIMPLE_ variants of _PM_OPS() do not include runtime PM handles
and are only used in case CONFIG_PM_SLEEP=y, we should not be exporting
dev_pm_ops symbol for them in case CONFIG_PM_SLEEP=n.

This can be fixed by having two distinct set of export macros for both
_RUNTIME_ and _SIMPLE_ variants of _PM_OPS(), such that the export of
dev_pm_ops symbol used in each variant depends on CONFIG_PM and
CONFIG_PM_SLEEP respectively.

Changes since v1:
- Update drivers to new set of macros

Raag Jadav (10):
PM: Introduce export macros for _SIMPLE_ variants of _PM_OPS()
PM: Update EXPORT_*_DEV_PM_OPS() to EXPORT_*_RUNTIME_PM_OPS()
iio: accel: fxls8962af: convert to EXPORT_NS_GPL_RUNTIME_PM_OPS()
iio: gyro: fxas21002c: convert to EXPORT_NS_GPL_RUNTIME_PM_OPS()
iio: imu: inv_icm42600: convert to EXPORT_NS_GPL_RUNTIME_PM_OPS()
iio: imu: inv_mpu: convert to EXPORT_NS_GPL_RUNTIME_PM_OPS()
drm/imx/dcss: convert to EXPORT_GPL_RUNTIME_PM_OPS()
mfd: arizona: convert to EXPORT_GPL_RUNTIME_PM_OPS()
mfd: cs42l43: convert to EXPORT_NS_GPL_RUNTIME_PM_OPS()
ASoC: cs35l41: convert to EXPORT_GPL_RUNTIME_PM_OPS()

drivers/gpu/drm/imx/dcss/dcss-dev.c | 2 +-
drivers/iio/accel/fxls8962af-core.c | 2 +-
drivers/iio/gyro/fxas21002c_core.c | 2 +-
.../iio/imu/inv_icm42600/inv_icm42600_core.c | 2 +-
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 2 +-
drivers/mfd/arizona-core.c | 2 +-
drivers/mfd/cs42l43.c | 2 +-
include/linux/pm.h | 38 ++++++++++++-------
include/linux/pm_runtime.h | 13 +++++--
sound/soc/codecs/cs35l41.c | 2 +-
10 files changed, 41 insertions(+), 26 deletions(-)

--
2.17.1