Skip to contentSkip to conversation

Drivers: ssb: remove unnecessary CONFIG_PM_SLEEP

PATCH In review Coiby Xu 2 participants 2 messages Oct 29, 2020 – Nov 7, 2020 Sonics silicon backplane driver (ssb)

lore
Share & tools
lore

Coiby Xu

author
#0 lore raw

PATCH 1/1 Drivers: ssb: remove unnecessary CONFIG_PM_SLEEP

SET_SYSTEM_SLEEP_PM_OPS has already took good care of CONFIG_PM_CONFIG.

---
 drivers/ssb/pcihost_wrapper.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/ssb/pcihost_wrapper.c +0 -5
index 410215c16920..6510f57469a0 100644
@@ -18,7 +18,6 @@
 #include <linux/ssb/ssb.h>
 
 
-#ifdef CONFIG_PM_SLEEP
 static int ssb_pcihost_suspend(struct device *d)
 {
 	struct pci_dev *dev = to_pci_dev(d);
@@ -62,8 +61,6 @@ static const struct dev_pm_ops ssb_pcihost_pm_ops = {
 	SET_SYSTEM_SLEEP_PM_OPS(ssb_pcihost_suspend, ssb_pcihost_resume)
 };
 
-#endif /* CONFIG_PM_SLEEP */
-
 static int ssb_pcihost_probe(struct pci_dev *dev,
 			     const struct pci_device_id *id)
 {
@@ -125,9 +122,7 @@ int ssb_pcihost_register(struct pci_driver *driver)
 {
 	driver->probe = ssb_pcihost_probe;
 	driver->remove = ssb_pcihost_remove;
-#ifdef CONFIG_PM_SLEEP
 	driver->driver.pm = &ssb_pcihost_pm_ops;
-#endif
 
 	return pci_register_driver(driver);
 }
Signature · 1 line
2.28.0
#1 lore raw
Quoted 29 lines · Coiby Xu

SET_SYSTEM_SLEEP_PM_OPS has already took good care of CONFIG_PM_CONFIG.

---
 drivers/ssb/pcihost_wrapper.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/ssb/pcihost_wrapper.c +0 -3
index 410215c16920..6510f57469a0 100644
@@ -18,7 +18,6 @@
 #include <linux/ssb/ssb.h>
 
 
-#ifdef CONFIG_PM_SLEEP
 static int ssb_pcihost_suspend(struct device *d)
 {
 	struct pci_dev *dev = to_pci_dev(d);
@@ -62,8 +61,6 @@ static const struct dev_pm_ops ssb_pcihost_pm_ops = {
 	SET_SYSTEM_SLEEP_PM_OPS(ssb_pcihost_suspend, ssb_pcihost_resume)
 };
 
-#endif /* CONFIG_PM_SLEEP */
-
 static int ssb_pcihost_probe(struct pci_dev *dev,
 			     const struct pci_device_id *id)
 {

drivers/ssb/pcihost_wrapper.c int ssb_pcihost_register(struct pci_driver *driver) · line 128

Quoted 9 lines
drivers/ssb/pcihost_wrapper.c +0 -2
@@ -125,9 +122,7 @@ int ssb_pcihost_register(struct pci_driver *driver)
 {
 	driver->probe = ssb_pcihost_probe;
 	driver->remove = ssb_pcihost_remove;
-#ifdef CONFIG_PM_SLEEP
 	driver->driver.pm = &ssb_pcihost_pm_ops;
-#endif
 
 	return pci_register_driver(driver);
 }

I'm not convinced that this is correct. How have you confirmed that there are no compiler or sparse warnings?

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches