PM: Remove CONFIG_PM_OPS
authorRafael J. Wysocki <rjw@sisk.pl>
Thu, 10 Feb 2011 23:06:54 +0000 (00:06 +0100)
committerRafael J. Wysocki <rjw@sisk.pl>
Mon, 14 Mar 2011 23:43:15 +0000 (00:43 +0100)
After redefining CONFIG_PM to depend on (CONFIG_PM_SLEEP ||
CONFIG_PM_RUNTIME) the CONFIG_PM_OPS option is redundant and can be
replaced with CONFIG_PM.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
12 files changed:
drivers/acpi/sleep.c
drivers/base/power/Makefile
drivers/net/e1000e/netdev.c
drivers/net/pch_gbe/pch_gbe_main.c
drivers/pci/pci-driver.c
drivers/scsi/Makefile
drivers/scsi/scsi_priv.h
drivers/scsi/scsi_sysfs.c
drivers/usb/core/hcd-pci.c
include/acpi/acpi_bus.h
include/linux/pm.h
kernel/power/Kconfig

index d6a8cd14de2e824ddb15563aa625fa1d5236ea5a..8ea092fad3f69181383c80e5a14a8303f9d36185 100644 (file)
@@ -585,7 +585,7 @@ int acpi_suspend(u32 acpi_state)
        return -EINVAL;
 }
 
-#ifdef CONFIG_PM_OPS
+#ifdef CONFIG_PM
 /**
  *     acpi_pm_device_sleep_state - return preferred power state of ACPI device
  *             in the system sleep state given by %acpi_target_sleep_state
@@ -671,7 +671,7 @@ int acpi_pm_device_sleep_state(struct device *dev, int *d_min_p)
                *d_min_p = d_min;
        return d_max;
 }
-#endif /* CONFIG_PM_OPS */
+#endif /* CONFIG_PM */
 
 #ifdef CONFIG_PM_SLEEP
 /**
index abe46edfe5b41b9c2c5b39640c94c2208ffe283b..118c1b92a511c3819ac27e424eaad23831dee0c6 100644 (file)
@@ -1,7 +1,6 @@
-obj-$(CONFIG_PM)       += sysfs.o
+obj-$(CONFIG_PM)       += sysfs.o generic_ops.o
 obj-$(CONFIG_PM_SLEEP) += main.o wakeup.o
 obj-$(CONFIG_PM_RUNTIME)       += runtime.o
-obj-$(CONFIG_PM_OPS)   += generic_ops.o
 obj-$(CONFIG_PM_TRACE_RTC)     += trace.o
 obj-$(CONFIG_PM_OPP)   += opp.o
 
index 2e5022849f1828c19a1bc968e7112cdf487d4145..6d513a383340c17c21b6c210e881c70189bc9012 100644 (file)
@@ -5338,7 +5338,7 @@ void e1000e_disable_aspm(struct pci_dev *pdev, u16 state)
        __e1000e_disable_aspm(pdev, state);
 }
 
-#ifdef CONFIG_PM_OPS
+#ifdef CONFIG_PM
 static bool e1000e_pm_ready(struct e1000_adapter *adapter)
 {
        return !!adapter->tx_ring->buffer_info;
@@ -5489,7 +5489,7 @@ static int e1000_runtime_resume(struct device *dev)
        return __e1000_resume(pdev);
 }
 #endif /* CONFIG_PM_RUNTIME */
-#endif /* CONFIG_PM_OPS */
+#endif /* CONFIG_PM */
 
 static void e1000_shutdown(struct pci_dev *pdev)
 {
@@ -6196,7 +6196,7 @@ static DEFINE_PCI_DEVICE_TABLE(e1000_pci_tbl) = {
 };
 MODULE_DEVICE_TABLE(pci, e1000_pci_tbl);
 
-#ifdef CONFIG_PM_OPS
+#ifdef CONFIG_PM
 static const struct dev_pm_ops e1000_pm_ops = {
        SET_SYSTEM_SLEEP_PM_OPS(e1000_suspend, e1000_resume)
        SET_RUNTIME_PM_OPS(e1000_runtime_suspend,
@@ -6210,7 +6210,7 @@ static struct pci_driver e1000_driver = {
        .id_table = e1000_pci_tbl,
        .probe    = e1000_probe,
        .remove   = __devexit_p(e1000_remove),
-#ifdef CONFIG_PM_OPS
+#ifdef CONFIG_PM
        .driver.pm = &e1000_pm_ops,
 #endif
        .shutdown = e1000_shutdown,
index b99e90aca37dc4afa70cfc58195b5d59c90b7b48..8c66e22c3a0a5444c30d44efa846553f640c22e3 100644 (file)
@@ -2446,7 +2446,7 @@ static struct pci_driver pch_gbe_pcidev = {
        .id_table = pch_gbe_pcidev_id,
        .probe = pch_gbe_probe,
        .remove = pch_gbe_remove,
-#ifdef CONFIG_PM_OPS
+#ifdef CONFIG_PM
        .driver.pm = &pch_gbe_pm_ops,
 #endif
        .shutdown = pch_gbe_shutdown,
index 88246dd4645258d865102cbc20dba99ccfe0a5e3..d86ea8b0113701ecbbcb26de06c20f6d60089510 100644 (file)
@@ -431,7 +431,7 @@ static void pci_device_shutdown(struct device *dev)
        pci_msix_shutdown(pci_dev);
 }
 
-#ifdef CONFIG_PM_OPS
+#ifdef CONFIG_PM
 
 /* Auxiliary functions used for system resume and run-time resume. */
 
@@ -1059,7 +1059,7 @@ static int pci_pm_runtime_idle(struct device *dev)
 
 #endif /* !CONFIG_PM_RUNTIME */
 
-#ifdef CONFIG_PM_OPS
+#ifdef CONFIG_PM
 
 const struct dev_pm_ops pci_dev_pm_ops = {
        .prepare = pci_pm_prepare,
index 2e9a87e8e7d83579142383fbb21c4c55338ac29e..ef6de669424b709720fd71c7f0fa1fca72446f5d 100644 (file)
@@ -165,7 +165,7 @@ scsi_mod-$(CONFIG_SCSI_NETLINK)     += scsi_netlink.o
 scsi_mod-$(CONFIG_SYSCTL)      += scsi_sysctl.o
 scsi_mod-$(CONFIG_SCSI_PROC_FS)        += scsi_proc.o
 scsi_mod-y                     += scsi_trace.o
-scsi_mod-$(CONFIG_PM_OPS)      += scsi_pm.o
+scsi_mod-$(CONFIG_PM)          += scsi_pm.o
 
 scsi_tgt-y                     += scsi_tgt_lib.o scsi_tgt_if.o
 
index b4056d14f812d7ecc4e8affc0c234bf6e4837424..342ee1a9c41d0fbfd3504de5d2c8ea8727269b7f 100644 (file)
@@ -146,7 +146,7 @@ static inline void scsi_netlink_exit(void) {}
 #endif
 
 /* scsi_pm.c */
-#ifdef CONFIG_PM_OPS
+#ifdef CONFIG_PM
 extern const struct dev_pm_ops scsi_bus_pm_ops;
 #endif
 #ifdef CONFIG_PM_RUNTIME
index 490ce213204e9dc2bfb5d1699abdb99066cd8c05..e44ff64233fd5fbe00a4aa675081bcac319739af 100644 (file)
@@ -383,7 +383,7 @@ struct bus_type scsi_bus_type = {
         .name          = "scsi",
         .match         = scsi_bus_match,
        .uevent         = scsi_bus_uevent,
-#ifdef CONFIG_PM_OPS
+#ifdef CONFIG_PM
        .pm             = &scsi_bus_pm_ops,
 #endif
 };
index f71e8e307e0f0c0b513c763b1ddfcb7b81f0cded..64a035ba2eab7098cdbbbd1432e308c948a339d0 100644 (file)
@@ -335,7 +335,7 @@ void usb_hcd_pci_shutdown(struct pci_dev *dev)
 }
 EXPORT_SYMBOL_GPL(usb_hcd_pci_shutdown);
 
-#ifdef CONFIG_PM_OPS
+#ifdef CONFIG_PM
 
 #ifdef CONFIG_PPC_PMAC
 static void powermac_set_asic(struct pci_dev *pci_dev, int enable)
@@ -580,4 +580,4 @@ const struct dev_pm_ops usb_hcd_pci_pm_ops = {
 };
 EXPORT_SYMBOL_GPL(usb_hcd_pci_pm_ops);
 
-#endif /* CONFIG_PM_OPS */
+#endif /* CONFIG_PM */
index 78ca429929f7438959e6509dcd0f547cfb44afd5..ff103ba96b78cb4956cd49259ce0dfa4947b04e3 100644 (file)
@@ -381,7 +381,7 @@ struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle);
 int acpi_enable_wakeup_device_power(struct acpi_device *dev, int state);
 int acpi_disable_wakeup_device_power(struct acpi_device *dev);
 
-#ifdef CONFIG_PM_OPS
+#ifdef CONFIG_PM
 int acpi_pm_device_sleep_state(struct device *, int *);
 #else
 static inline int acpi_pm_device_sleep_state(struct device *d, int *p)
index 21415cc91cbb440492f06091b8237c9bed42d00d..9279175a4557fa60f54c6fe0feb950672404c8bb 100644 (file)
@@ -267,7 +267,7 @@ const struct dev_pm_ops name = { \
  * callbacks provided by device drivers supporting both the system sleep PM and
  * runtime PM, make the pm member point to generic_subsys_pm_ops.
  */
-#ifdef CONFIG_PM_OPS
+#ifdef CONFIG_PM
 extern struct dev_pm_ops generic_subsys_pm_ops;
 #define GENERIC_SUBSYS_PM_OPS  (&generic_subsys_pm_ops)
 #else
index 1e4d9238c5dac961bb203fe564ca8df2b6e379a9..0710beead05bb146855fea61575e1ffe0aff21c0 100644 (file)
@@ -220,11 +220,6 @@ config APM_EMULATION
          anything, try disabling/enabling this option (or disabling/enabling
          APM in your BIOS).
 
-config PM_OPS
-       bool
-       depends on PM_SLEEP || PM_RUNTIME
-       default y
-
 config ARCH_HAS_OPP
        bool