diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-11-27 17:16:57 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-12-03 18:50:33 -0500 |
commit | fbb988be7f691599f17c6915c605bd09ec4318b4 (patch) | |
tree | aa7b0269acc38de01c289afbae21f6f640dd5e0f | |
parent | 5de21bb998b8e816e6a1df1f2c04d95fb6e27a5d (diff) |
PCI / PM: Drop CONFIG_PM_RUNTIME from the PCI core
After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is
selected) PM_RUNTIME is always set if PM is set, so quite a few
depend on CONFIG_PM.
Replace CONFIG_PM_RUNTIME with CONFIG_PM in the PCI core code.
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/pci/pci-driver.c | 20 | ||||
-rw-r--r-- | drivers/pci/pci-sysfs.c | 4 | ||||
-rw-r--r-- | drivers/pci/pcie/Kconfig | 2 |
3 files changed, 10 insertions, 16 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 2b3c89425bb5..887e6bd95af7 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c | |||
@@ -1104,7 +1104,7 @@ static int pci_pm_restore(struct device *dev) | |||
1104 | 1104 | ||
1105 | #endif /* !CONFIG_HIBERNATE_CALLBACKS */ | 1105 | #endif /* !CONFIG_HIBERNATE_CALLBACKS */ |
1106 | 1106 | ||
1107 | #ifdef CONFIG_PM_RUNTIME | 1107 | #ifdef CONFIG_PM |
1108 | 1108 | ||
1109 | static int pci_pm_runtime_suspend(struct device *dev) | 1109 | static int pci_pm_runtime_suspend(struct device *dev) |
1110 | { | 1110 | { |
@@ -1200,16 +1200,6 @@ static int pci_pm_runtime_idle(struct device *dev) | |||
1200 | return ret; | 1200 | return ret; |
1201 | } | 1201 | } |
1202 | 1202 | ||
1203 | #else /* !CONFIG_PM_RUNTIME */ | ||
1204 | |||
1205 | #define pci_pm_runtime_suspend NULL | ||
1206 | #define pci_pm_runtime_resume NULL | ||
1207 | #define pci_pm_runtime_idle NULL | ||
1208 | |||
1209 | #endif /* !CONFIG_PM_RUNTIME */ | ||
1210 | |||
1211 | #ifdef CONFIG_PM | ||
1212 | |||
1213 | static const struct dev_pm_ops pci_dev_pm_ops = { | 1203 | static const struct dev_pm_ops pci_dev_pm_ops = { |
1214 | .prepare = pci_pm_prepare, | 1204 | .prepare = pci_pm_prepare, |
1215 | .suspend = pci_pm_suspend, | 1205 | .suspend = pci_pm_suspend, |
@@ -1231,11 +1221,15 @@ static const struct dev_pm_ops pci_dev_pm_ops = { | |||
1231 | 1221 | ||
1232 | #define PCI_PM_OPS_PTR (&pci_dev_pm_ops) | 1222 | #define PCI_PM_OPS_PTR (&pci_dev_pm_ops) |
1233 | 1223 | ||
1234 | #else /* !COMFIG_PM_OPS */ | 1224 | #else /* !CONFIG_PM */ |
1225 | |||
1226 | #define pci_pm_runtime_suspend NULL | ||
1227 | #define pci_pm_runtime_resume NULL | ||
1228 | #define pci_pm_runtime_idle NULL | ||
1235 | 1229 | ||
1236 | #define PCI_PM_OPS_PTR NULL | 1230 | #define PCI_PM_OPS_PTR NULL |
1237 | 1231 | ||
1238 | #endif /* !COMFIG_PM_OPS */ | 1232 | #endif /* !CONFIG_PM */ |
1239 | 1233 | ||
1240 | /** | 1234 | /** |
1241 | * __pci_register_driver - register a new pci driver | 1235 | * __pci_register_driver - register a new pci driver |
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 2c6643fdc0cf..5c21e81b7caf 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
@@ -385,7 +385,7 @@ static ssize_t dev_bus_rescan_store(struct device *dev, | |||
385 | } | 385 | } |
386 | static DEVICE_ATTR(rescan, (S_IWUSR|S_IWGRP), NULL, dev_bus_rescan_store); | 386 | static DEVICE_ATTR(rescan, (S_IWUSR|S_IWGRP), NULL, dev_bus_rescan_store); |
387 | 387 | ||
388 | #if defined(CONFIG_PM_RUNTIME) && defined(CONFIG_ACPI) | 388 | #if defined(CONFIG_PM) && defined(CONFIG_ACPI) |
389 | static ssize_t d3cold_allowed_store(struct device *dev, | 389 | static ssize_t d3cold_allowed_store(struct device *dev, |
390 | struct device_attribute *attr, | 390 | struct device_attribute *attr, |
391 | const char *buf, size_t count) | 391 | const char *buf, size_t count) |
@@ -566,7 +566,7 @@ static struct attribute *pci_dev_attrs[] = { | |||
566 | &dev_attr_enable.attr, | 566 | &dev_attr_enable.attr, |
567 | &dev_attr_broken_parity_status.attr, | 567 | &dev_attr_broken_parity_status.attr, |
568 | &dev_attr_msi_bus.attr, | 568 | &dev_attr_msi_bus.attr, |
569 | #if defined(CONFIG_PM_RUNTIME) && defined(CONFIG_ACPI) | 569 | #if defined(CONFIG_PM) && defined(CONFIG_ACPI) |
570 | &dev_attr_d3cold_allowed.attr, | 570 | &dev_attr_d3cold_allowed.attr, |
571 | #endif | 571 | #endif |
572 | #ifdef CONFIG_OF | 572 | #ifdef CONFIG_OF |
diff --git a/drivers/pci/pcie/Kconfig b/drivers/pci/pcie/Kconfig index 7958e59d6077..e294713c8143 100644 --- a/drivers/pci/pcie/Kconfig +++ b/drivers/pci/pcie/Kconfig | |||
@@ -79,4 +79,4 @@ endchoice | |||
79 | 79 | ||
80 | config PCIE_PME | 80 | config PCIE_PME |
81 | def_bool y | 81 | def_bool y |
82 | depends on PCIEPORTBUS && PM_RUNTIME | 82 | depends on PCIEPORTBUS && PM |