Skip to contentSkip to conversation

isci: add CONFIG_PM_SLEEP to suspend/resume functions

PATCH In review Jingoo Han 2 participants 2 messages Mar 26, 2013 – Apr 4, 2013 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/1 isci: add CONFIG_PM_SLEEP to suspend/resume functions

Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following build warning when CONFIG_PM_SLEEP is not selected. This is because sleep PM callbacks defined by SIMPLE_DEV_PM_OPS are only used when the CONFIG_PM_SLEEP is enabled.

drivers/scsi/isci/init.c:725:12: warning: 'isci_suspend' defined but not used [-Wunused-function] drivers/scsi/isci/init.c:743:12: warning: 'isci_resume' defined but not used [-Wunused-function]

---
 drivers/scsi/isci/init.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
drivers/scsi/isci/init.c +2 -4
index 2839baa..d25d0d8 100644
@@ -721,7 +721,7 @@ static void isci_pci_remove(struct pci_dev *pdev)
 	}
 }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int isci_suspend(struct device *dev)
 {
 	struct pci_dev *pdev = to_pci_dev(dev);
@@ -770,18 +770,16 @@ static int isci_resume(struct device *dev)
 
 	return 0;
 }
+#endif
 
 static SIMPLE_DEV_PM_OPS(isci_pm_ops, isci_suspend, isci_resume);
-#endif
 
 static struct pci_driver isci_pci_driver = {
 	.name		= DRV_NAME,
 	.id_table	= isci_id_table,
 	.probe		= isci_pci_probe,
 	.remove		= isci_pci_remove,
-#ifdef CONFIG_PM
 	.driver.pm      = &isci_pm_ops,
-#endif
 };
 
 static __init int isci_init(void)
Signature · 1 line
1.7.2.5

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): D9FFE20C522965449E182ACE73889AEB19A2EDB8@IRSMSX102.ger.corp.intel.com

Acked-by
#3 lore raw
Quoted 11 lines · On Tue, 26 Mar 2013 00:01:38 -0700 Jingoo Han <[email protected]> wrote:

Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following build warning when CONFIG_PM_SLEEP is not selected. This is because sleep PM callbacks defined by SIMPLE_DEV_PM_OPS are only used when the CONFIG_PM_SLEEP is enabled.

drivers/scsi/isci/init.c:725:12: warning: 'isci_suspend' defined but not used [- Wunused-function]
drivers/scsi/isci/init.c:743:12: warning: 'isci_resume' defined but not used [- Wunused-function]

Quoted 39 lines
---
 drivers/scsi/isci/init.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
drivers/scsi/isci/init.c +2 -5
index 2839baa..d25d0d8 100644
@@ -721,7 +721,7 @@ static void isci_pci_remove(struct pci_dev *pdev)
 	}
 }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int isci_suspend(struct device *dev)
 {
 	struct pci_dev *pdev = to_pci_dev(dev);
@@ -770,18 +770,16 @@ static int isci_resume(struct device *dev)
 
 	return 0;
 }
+#endif
 
 static SIMPLE_DEV_PM_OPS(isci_pm_ops, isci_suspend, isci_resume);
-#endif
 
 static struct pci_driver isci_pci_driver = {
 	.name		= DRV_NAME,
 	.id_table	= isci_id_table,
 	.probe		= isci_pci_probe,
 	.remove		= isci_pci_remove,
-#ifdef CONFIG_PM
 	.driver.pm      = &isci_pm_ops,
-#endif
 };
 
 static __init int isci_init(void)
--

1.7.2.5