Re: [Update][PATCH 4/4] PCI / PM: Drop CONFIG_PM_RUNTIME from the PCI core

2014-12-01 Thread Bjorn Helgaas
On Thu, Nov 27, 2014 at 3:41 PM, Rafael J. Wysocki  wrote:
> From: Rafael J. Wysocki 
> Subject: 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
> #ifdef blocks depending on CONFIG_PM_RUNTIME may now be changed to
> depend on CONFIG_PM.
>
> Replace CONFIG_PM_RUNTIME with CONFIG_PM in the PCI core code.
>
> Signed-off-by: Rafael J. Wysocki 

I acked this on IRC, and I think Rafael plans to merge this via his
tree, but for the archives:

Acked-by: Bjorn Helgaas 

> ---
>
> Changelog fixup.
>
> ---
>  drivers/pci/pci-driver.c |   20 +++-
>  drivers/pci/pci-sysfs.c  |4 ++--
>  drivers/pci/pcie/Kconfig |2 +-
>  3 files changed, 10 insertions(+), 16 deletions(-)
>
> Index: linux-pm/drivers/pci/pcie/Kconfig
> ===
> --- linux-pm.orig/drivers/pci/pcie/Kconfig
> +++ linux-pm/drivers/pci/pcie/Kconfig
> @@ -79,4 +79,4 @@ endchoice
>
>  config PCIE_PME
> def_bool y
> -   depends on PCIEPORTBUS && PM_RUNTIME
> +   depends on PCIEPORTBUS && PM
> Index: linux-pm/drivers/pci/pci-driver.c
> ===
> --- linux-pm.orig/drivers/pci/pci-driver.c
> +++ linux-pm/drivers/pci/pci-driver.c
> @@ -1104,7 +1104,7 @@ static int pci_pm_restore(struct device
>
>  #endif /* !CONFIG_HIBERNATE_CALLBACKS */
>
> -#ifdef CONFIG_PM_RUNTIME
> +#ifdef CONFIG_PM
>
>  static int pci_pm_runtime_suspend(struct device *dev)
>  {
> @@ -1200,16 +1200,6 @@ static int pci_pm_runtime_idle(struct de
> return ret;
>  }
>
> -#else /* !CONFIG_PM_RUNTIME */
> -
> -#define pci_pm_runtime_suspend NULL
> -#define pci_pm_runtime_resume  NULL
> -#define pci_pm_runtime_idleNULL
> -
> -#endif /* !CONFIG_PM_RUNTIME */
> -
> -#ifdef CONFIG_PM
> -
>  static const struct dev_pm_ops pci_dev_pm_ops = {
> .prepare = pci_pm_prepare,
> .suspend = pci_pm_suspend,
> @@ -1231,11 +1221,15 @@ static const struct dev_pm_ops pci_dev_p
>
>  #define PCI_PM_OPS_PTR (_dev_pm_ops)
>
> -#else /* !COMFIG_PM_OPS */
> +#else /* !CONFIG_PM */
> +
> +#define pci_pm_runtime_suspend NULL
> +#define pci_pm_runtime_resume  NULL
> +#define pci_pm_runtime_idleNULL
>
>  #define PCI_PM_OPS_PTR NULL
>
> -#endif /* !COMFIG_PM_OPS */
> +#endif /* !CONFIG_PM */
>
>  /**
>   * __pci_register_driver - register a new pci driver
> Index: linux-pm/drivers/pci/pci-sysfs.c
> ===
> --- linux-pm.orig/drivers/pci/pci-sysfs.c
> +++ linux-pm/drivers/pci/pci-sysfs.c
> @@ -385,7 +385,7 @@ static ssize_t dev_bus_rescan_store(stru
>  }
>  static DEVICE_ATTR(rescan, (S_IWUSR|S_IWGRP), NULL, dev_bus_rescan_store);
>
> -#if defined(CONFIG_PM_RUNTIME) && defined(CONFIG_ACPI)
> +#if defined(CONFIG_PM) && defined(CONFIG_ACPI)
>  static ssize_t d3cold_allowed_store(struct device *dev,
> struct device_attribute *attr,
> const char *buf, size_t count)
> @@ -566,7 +566,7 @@ static struct attribute *pci_dev_attrs[]
> _attr_enable.attr,
> _attr_broken_parity_status.attr,
> _attr_msi_bus.attr,
> -#if defined(CONFIG_PM_RUNTIME) && defined(CONFIG_ACPI)
> +#if defined(CONFIG_PM) && defined(CONFIG_ACPI)
> _attr_d3cold_allowed.attr,
>  #endif
>  #ifdef CONFIG_OF
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [Update][PATCH 4/4] PCI / PM: Drop CONFIG_PM_RUNTIME from the PCI core

2014-12-01 Thread Bjorn Helgaas
On Thu, Nov 27, 2014 at 3:41 PM, Rafael J. Wysocki r...@rjwysocki.net wrote:
 From: Rafael J. Wysocki rafael.j.wyso...@intel.com
 Subject: 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
 #ifdef blocks depending on CONFIG_PM_RUNTIME may now be changed to
 depend on CONFIG_PM.

 Replace CONFIG_PM_RUNTIME with CONFIG_PM in the PCI core code.

 Signed-off-by: Rafael J. Wysocki rafael.j.wyso...@intel.com

I acked this on IRC, and I think Rafael plans to merge this via his
tree, but for the archives:

Acked-by: Bjorn Helgaas bhelg...@google.com

 ---

 Changelog fixup.

 ---
  drivers/pci/pci-driver.c |   20 +++-
  drivers/pci/pci-sysfs.c  |4 ++--
  drivers/pci/pcie/Kconfig |2 +-
  3 files changed, 10 insertions(+), 16 deletions(-)

 Index: linux-pm/drivers/pci/pcie/Kconfig
 ===
 --- linux-pm.orig/drivers/pci/pcie/Kconfig
 +++ linux-pm/drivers/pci/pcie/Kconfig
 @@ -79,4 +79,4 @@ endchoice

  config PCIE_PME
 def_bool y
 -   depends on PCIEPORTBUS  PM_RUNTIME
 +   depends on PCIEPORTBUS  PM
 Index: linux-pm/drivers/pci/pci-driver.c
 ===
 --- linux-pm.orig/drivers/pci/pci-driver.c
 +++ linux-pm/drivers/pci/pci-driver.c
 @@ -1104,7 +1104,7 @@ static int pci_pm_restore(struct device

  #endif /* !CONFIG_HIBERNATE_CALLBACKS */

 -#ifdef CONFIG_PM_RUNTIME
 +#ifdef CONFIG_PM

  static int pci_pm_runtime_suspend(struct device *dev)
  {
 @@ -1200,16 +1200,6 @@ static int pci_pm_runtime_idle(struct de
 return ret;
  }

 -#else /* !CONFIG_PM_RUNTIME */
 -
 -#define pci_pm_runtime_suspend NULL
 -#define pci_pm_runtime_resume  NULL
 -#define pci_pm_runtime_idleNULL
 -
 -#endif /* !CONFIG_PM_RUNTIME */
 -
 -#ifdef CONFIG_PM
 -
  static const struct dev_pm_ops pci_dev_pm_ops = {
 .prepare = pci_pm_prepare,
 .suspend = pci_pm_suspend,
 @@ -1231,11 +1221,15 @@ static const struct dev_pm_ops pci_dev_p

  #define PCI_PM_OPS_PTR (pci_dev_pm_ops)

 -#else /* !COMFIG_PM_OPS */
 +#else /* !CONFIG_PM */
 +
 +#define pci_pm_runtime_suspend NULL
 +#define pci_pm_runtime_resume  NULL
 +#define pci_pm_runtime_idleNULL

  #define PCI_PM_OPS_PTR NULL

 -#endif /* !COMFIG_PM_OPS */
 +#endif /* !CONFIG_PM */

  /**
   * __pci_register_driver - register a new pci driver
 Index: linux-pm/drivers/pci/pci-sysfs.c
 ===
 --- linux-pm.orig/drivers/pci/pci-sysfs.c
 +++ linux-pm/drivers/pci/pci-sysfs.c
 @@ -385,7 +385,7 @@ static ssize_t dev_bus_rescan_store(stru
  }
  static DEVICE_ATTR(rescan, (S_IWUSR|S_IWGRP), NULL, dev_bus_rescan_store);

 -#if defined(CONFIG_PM_RUNTIME)  defined(CONFIG_ACPI)
 +#if defined(CONFIG_PM)  defined(CONFIG_ACPI)
  static ssize_t d3cold_allowed_store(struct device *dev,
 struct device_attribute *attr,
 const char *buf, size_t count)
 @@ -566,7 +566,7 @@ static struct attribute *pci_dev_attrs[]
 dev_attr_enable.attr,
 dev_attr_broken_parity_status.attr,
 dev_attr_msi_bus.attr,
 -#if defined(CONFIG_PM_RUNTIME)  defined(CONFIG_ACPI)
 +#if defined(CONFIG_PM)  defined(CONFIG_ACPI)
 dev_attr_d3cold_allowed.attr,
  #endif
  #ifdef CONFIG_OF

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/