misc / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
PATCH 1/1 misc / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
From: Rafael J. Wysocki <[email protected]>
After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks depending on CONFIG_PM_RUNTIME may now be changed to depend on CONFIG_PM.
Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under drivers/misc/.
---
Note: This depends on commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected) which is only in linux-next at the moment (via the linux-pm tree).
Please let me know if it is OK to take this one into linux-pm.
--- drivers/misc/apds990x.c | 4 ++-- drivers/misc/bh1770glc.c | 2 +- drivers/misc/lis3lv02d/lis3lv02d_i2c.c | 4 ++-- drivers/misc/mei/mei_dev.h | 4 ++-- drivers/misc/mei/pci-me.c | 8 ++++---- drivers/misc/mei/pci-txe.c | 8 +++----- 6 files changed, 14 insertions(+), 16 deletions(-)
drivers/misc/lis3lv02d/lis3lv02d_i2c.c +2 -2
@@ -235,7 +235,7 @@ static int lis3lv02d_i2c_resume(struct d }#endif /* CONFIG_PM_SLEEP */ -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM static int lis3_i2c_runtime_suspend (struct device *dev) { struct i2c_client *client = container_of(dev, struct i2c_client, dev);
@@ -253,7 +253,7 @@ static int lis3_i2c_runtime_resume(struclis3lv02d_poweron (lis3);return 0 ; } -#endif /* CONFIG_PM_RUNTIME */ +#endif /* CONFIG_PM */ static const struct i2c_device_id lis3lv02d_id[] = { {"lis3lv02d" ,LIS3LV02D },
drivers/misc/mei/mei_dev.h +2 -2
@@ -530,9 +530,9 @@ struct mei_device {* Power Gating support */ enum mei_pg_event pg_event; -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM struct dev_pm_domain pg_domain; -#endif /* CONFIG_PM_RUNTIME */ +#endif /* CONFIG_PM */ unsigned char rd_msg_buf[MEI_RD_MSG_BUF_SIZE ];u32 rd_msg_hdr;
drivers/misc/mei/pci-me.c +4 -4
@@ -89,13 +89,13 @@ static const struct pci_device_id mei_meMODULE_DEVICE_TABLE (pci, mei_me_pci_tbl); -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM static inline void mei_me_set_pm_domain (struct mei_device *dev);static inline void mei_me_unset_pm_domain (struct mei_device *dev);#else static inline void mei_me_set_pm_domain (struct mei_device *dev) {}static inline void mei_me_unset_pm_domain (struct mei_device *dev) {} -#endif /* CONFIG_PM_RUNTIME */ +#endif /* CONFIG_PM */ /** * mei_me_quirk_probe - probe for devices that doesn't valid ME interface
@@ -357,7 +357,7 @@ static int mei_me_pci_resume(struct devi }#endif /* CONFIG_PM_SLEEP */ -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM static int mei_me_pm_runtime_idle (struct device *device) {struct pci_dev *pdev =to_pci_dev (device);
@@ -453,7 +453,7 @@ static inline void mei_me_unset_pm_domai/* stop using pm callbacks if any */ dev->dev->pm_domain =NULL ; } -#endif /* CONFIG_PM_RUNTIME */ +#endif /* CONFIG_PM */ #ifdef CONFIG_PM static const struct dev_pm_ops mei_me_pm_ops = {
drivers/misc/mei/pci-txe.c +3 -5
@@ -42,13 +42,13 @@ static const struct pci_device_id mei_tx };MODULE_DEVICE_TABLE (pci, mei_txe_pci_tbl); -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM static inline void mei_txe_set_pm_domain (struct mei_device *dev);static inline void mei_txe_unset_pm_domain (struct mei_device *dev);#else static inline void mei_txe_set_pm_domain (struct mei_device *dev) {}static inline void mei_txe_unset_pm_domain (struct mei_device *dev) {} -#endif /* CONFIG_PM_RUNTIME */ +#endif /* CONFIG_PM */ static void mei_txe_pci_iounmap (struct pci_dev *pdev,struct mei_txe_hw *hw) {
@@ -295,7 +295,7 @@ static int mei_txe_pci_resume(struct dev }#endif /* CONFIG_PM_SLEEP */ -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM static int mei_txe_pm_runtime_idle (struct device *device) {struct pci_dev *pdev =to_pci_dev (device);
@@ -401,9 +401,7 @@ static inline void mei_txe_unset_pm_doma/* stop using pm callbacks if any */ dev->dev->pm_domain =NULL ; } -#endif /* CONFIG_PM_RUNTIME */ -#ifdef CONFIG_PM static const struct dev_pm_ops mei_txe_pm_ops = {SET_SYSTEM_SLEEP_PM_OPS (mei_txe_pci_suspend, mei_txe_pci_resume)
drivers/misc/apds990x.c +2 -2
@@ -609,7 +609,7 @@ static int apds990x_detect(struct apds99return ret; } -#if defined(CONFIG_PM ) || defined(CONFIG_PM_RUNTIME ) +#ifdef CONFIG_PM static int apds990x_chip_on (struct apds990x_chip *chip) { int err = regulator_bulk_enable(ARRAY_SIZE(chip->regs),
@@ -1237,7 +1237,7 @@ static int apds990x_resume(struct device }#endif -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM static int apds990x_runtime_suspend (struct device *dev) { struct i2c_client *client = container_of(dev, struct i2c_client, dev);
drivers/misc/bh1770glc.c +1 -1
@@ -1358,7 +1358,7 @@ static int bh1770_resume(struct device * }#endif -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM static int bh1770_runtime_suspend (struct device *dev) { struct i2c_client *client = container_of(dev, struct i2c_client, dev);
Quoted 10 lines · Rafael J. Wysocki
From: Rafael J. Wysocki <[email protected]>
After commit
b2b49ccbdd54(PM:Kconfig: SetPM_RUNTIMEifPM_SLEEPis selected)PM_RUNTIMEis always set if PM is set, so #ifdef blocks depending onCONFIG_PM_RUNTIMEmay now be changed to depend onCONFIG_PM.Replace
CONFIG_PM_RUNTIMEwithCONFIG_PMeverywhere underdrivers/misc/.
Quoted 8 lines
Signed-off-by Rafael J. Wysocki <[email protected]>---
Note: This depends on commit
b2b49ccbdd54(PM:Kconfig: SetPM_RUNTIMEifPM_SLEEPis selected) which is only in linux-next at the moment (via the linux-pm tree).Please let me know if it is OK to take this one into linux-pm.
Please take it through your linux-pm tree:
A message that is not in the archive (sent off-list or not yet received): CA+SXBVTCnhUG383oNTtFgnDT_A1xOiM1HNOQNF+9Q5yAQJj8KQ@mail.gmail.com
Quoted 97 lines · Alexander Usyskin
--001a1132ed64aaf31305095ca68b
Content-Type: text/plain; charset=UTF-8Quoted 34 lines · Rafael J. Wysocki
From: Rafael J. Wysocki <[email protected]>
After commit
b2b49ccbdd54(PM:Kconfig: SetPM_RUNTIMEifPM_SLEEPis selected)PM_RUNTIMEis always set if PM is set, so #ifdef blocks depending onCONFIG_PM_RUNTIMEmay now be changed to depend onCONFIG_PM.Replace
CONFIG_PM_RUNTIMEwithCONFIG_PMeverywhere underdrivers/misc/.Signed-off-by Rafael J. Wysocki <[email protected]>---
Note: This depends on commit
b2b49ccbdd54(PM:Kconfig: SetPM_RUNTIMEifPM_SLEEPis selected) which is only in linux-next at the moment (via the linux-pm tree).Please let me know if it is OK to take this one into linux-pm.
--- drivers/misc/apds990x.c | 4 ++-- drivers/misc/bh1770glc.c | 2 +- drivers/misc/lis3lv02d/lis3lv02d_i2c.c | 4 ++-- drivers/misc/mei/mei_dev.h | 4 ++-- drivers/misc/mei/pci-me.c | 8 ++++---- drivers/misc/mei/pci-txe.c | 8 +++----- 6 files changed, 14 insertions(+), 16 deletions(-)Index:
linux-pm/drivers/misc/lis3lv02d/lis3lv02d_i2c.c
===================================================================drivers/misc/lis3lv02d/lis3lv02d_i2c.c static int lis3lv02d_i2c_resume(struct d · line 241
Quoted 8 lines
drivers/misc/lis3lv02d/lis3lv02d_i2c.c +1
-1@@ -235,7 +235,7 @@ static int lis3lv02d_i2c_resume(struct d }#endif /* CONFIG_PM_SLEEP */ -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM static int lis3_i2c_runtime_suspend (struct device *dev) { struct i2c_client *client = container_of(dev, struct i2c_client,dev);
Quoted 49 lines
drivers/misc/lis3lv02d/lis3lv02d_i2c.c +1
-1@@ -253,7 +253,7 @@ static int lis3_i2c_runtime_resume(struclis3lv02d_poweron (lis3);return 0 ; } -#endif /* CONFIG_PM_RUNTIME */ +#endif /* CONFIG_PM */ static const struct i2c_device_id lis3lv02d_id[] = { {"lis3lv02d" ,LIS3LV02D },Index:
linux-pm/drivers/misc/mei/mei_dev.h
===================================================================drivers/misc/mei/mei_dev.h +2
-2@@ -530,9 +530,9 @@ struct mei_device {* Power Gating support */ enum mei_pg_event pg_event; -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM struct dev_pm_domain pg_domain; -#endif /* CONFIG_PM_RUNTIME */ +#endif /* CONFIG_PM */ unsigned char rd_msg_buf[MEI_RD_MSG_BUF_SIZE ];u32 rd_msg_hdr;Index:
linux-pm/drivers/misc/mei/pci-me.c
===================================================================drivers/misc/mei/pci-me.c +2
-2@@ -89,13 +89,13 @@ static const struct pci_device_id mei_meMODULE_DEVICE_TABLE (pci, mei_me_pci_tbl); -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM static inline void mei_me_set_pm_domain (struct mei_device *dev);static inline void mei_me_unset_pm_domain (struct mei_device *dev);#else static inline void mei_me_set_pm_domain (struct mei_device *dev) {}static inline void mei_me_unset_pm_domain (struct mei_device *dev) {} -#endif /* CONFIG_PM_RUNTIME */ +#endif /* CONFIG_PM */ /** * mei_me_quirk_probe - probe for devices that doesn't valid ME interface @@ -357,7 +357,7 @@ static int mei_me_pci_resume(struct devi }#endif /* CONFIG_PM_SLEEP */
Quoted 14 lines
drivers/misc/mei/pci-me.c static inline void mei_me_unset_pm_domai · line 457
Quoted 12 lines
drivers/misc/mei/pci-me.c +2
-2-#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM static int mei_me_pm_runtime_idle (struct device *device) {struct pci_dev *pdev =to_pci_dev (device);@@ -453,7 +453,7 @@ static inline void mei_me_unset_pm_domai/* stop using pm callbacks if any */ dev->dev->pm_domain = NULL; } -#endif /* CONFIG_PM_RUNTIME */ +#endif /* CONFIG_PM */ Here we can simply drop both endif and ifdef
Right, thanks for spotting that!
Rafael