浏览代码

Merge branch 'pm-runtime'

* pm-runtime: (25 commits)
  i2c-omap / PM: Drop CONFIG_PM_RUNTIME from i2c-omap.c
  dmaengine / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  drivers: sh / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  e1000e / igb / PM: Eliminate CONFIG_PM_RUNTIME
  MMC / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  MFD / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  misc / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  media / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  input / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  iio / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  hsi / OMAP / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  i2c-hid / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  drm / exynos / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  gpio / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  hwrandom / exynos / PM: Use CONFIG_PM in #ifdef
  block / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  USB / PM: Drop CONFIG_PM_RUNTIME from the USB core
  PM: Merge the SET*_RUNTIME_PM_OPS() macros
  PM / Kconfig: Do not select PM directly from Kconfig files
  PCI / PM: Drop CONFIG_PM_RUNTIME from the PCI core
  ...
Rafael J. Wysocki 10 年之前
父节点
当前提交
e3d857e1ae
共有 98 个文件被更改,包括 281 次插入535 次删除
  1. 6 8
      Documentation/ABI/stable/sysfs-bus-usb
  2. 9 10
      Documentation/ABI/testing/sysfs-bus-usb
  3. 9 8
      Documentation/usb/power-management.txt
  4. 1 1
      arch/ia64/Kconfig
  5. 0 1
      arch/sh/Kconfig
  6. 3 3
      block/blk-core.c
  7. 1 1
      block/elevator.c
  8. 1 3
      drivers/acpi/acpi_lpss.c
  9. 2 6
      drivers/acpi/device_pm.c
  10. 1 1
      drivers/acpi/pci_irq.c
  11. 1 1
      drivers/amba/bus.c
  12. 2 67
      drivers/base/power/clock_ops.c
  13. 3 31
      drivers/base/power/domain.c
  14. 0 11
      drivers/base/power/domain_governor.c
  15. 25 31
      drivers/base/power/power.h
  16. 0 5
      drivers/base/power/qos.c
  17. 32 44
      drivers/base/power/runtime.c
  18. 1 18
      drivers/base/power/sysfs.c
  19. 1 1
      drivers/char/hw_random/exynos-rng.c
  20. 1 1
      drivers/dma/nbpfaxi.c
  21. 1 1
      drivers/dma/ste_dma40.c
  22. 1 1
      drivers/dma/tegra20-apb-dma.c
  23. 4 4
      drivers/gpio/gpio-omap.c
  24. 1 1
      drivers/gpio/gpio-zynq.c
  25. 1 1
      drivers/gpu/drm/exynos/exynos_drm_fimc.c
  26. 1 1
      drivers/gpu/drm/exynos/exynos_drm_g2d.c
  27. 1 1
      drivers/gpu/drm/exynos/exynos_drm_gsc.c
  28. 1 1
      drivers/gpu/drm/exynos/exynos_drm_rotator.c
  29. 1 1
      drivers/hid/i2c-hid/i2c-hid.c
  30. 1 1
      drivers/hsi/controllers/omap_ssi.c
  31. 1 1
      drivers/hsi/controllers/omap_ssi_port.c
  32. 1 1
      drivers/i2c/busses/i2c-hix5hd2.c
  33. 1 1
      drivers/i2c/busses/i2c-nomadik.c
  34. 0 2
      drivers/i2c/busses/i2c-omap.c
  35. 2 2
      drivers/iio/accel/bmc150-accel.c
  36. 2 2
      drivers/iio/accel/kxcjk-1013.c
  37. 2 2
      drivers/iio/gyro/bmg160.c
  38. 1 1
      drivers/input/keyboard/samsung-keypad.c
  39. 1 1
      drivers/input/touchscreen/cyttsp4_core.c
  40. 2 2
      drivers/media/platform/coda/coda-common.c
  41. 3 3
      drivers/media/platform/exynos4-is/fimc-core.c
  42. 1 1
      drivers/media/platform/exynos4-is/fimc-is-i2c.c
  43. 1 1
      drivers/media/platform/exynos4-is/fimc-lite.c
  44. 1 1
      drivers/media/platform/exynos4-is/mipi-csis.c
  45. 2 2
      drivers/media/platform/s5p-jpeg/jpeg-core.c
  46. 1 1
      drivers/media/platform/s5p-mfc/s5p_mfc.c
  47. 4 6
      drivers/media/platform/s5p-mfc/s5p_mfc_pm.c
  48. 1 1
      drivers/mfd/ab8500-gpadc.c
  49. 2 2
      drivers/mfd/arizona-core.c
  50. 1 1
      drivers/mfd/wm8994-core.c
  51. 2 2
      drivers/misc/apds990x.c
  52. 1 1
      drivers/misc/bh1770glc.c
  53. 2 2
      drivers/misc/lis3lv02d/lis3lv02d_i2c.c
  54. 2 2
      drivers/misc/mei/mei_dev.h
  55. 3 5
      drivers/misc/mei/pci-me.c
  56. 3 5
      drivers/misc/mei/pci-txe.c
  57. 2 2
      drivers/mmc/core/bus.c
  58. 1 1
      drivers/mmc/host/mmci.c
  59. 1 1
      drivers/mmc/host/sdhci-acpi.c
  60. 2 2
      drivers/mmc/host/sdhci-esdhc-imx.c
  61. 7 11
      drivers/mmc/host/sdhci-pci.c
  62. 1 1
      drivers/mmc/host/sdhci-pxav3.c
  63. 3 3
      drivers/mmc/host/sdhci-s3c.c
  64. 2 5
      drivers/mmc/host/sdhci.c
  65. 0 3
      drivers/mmc/host/sdhci.h
  66. 1 1
      drivers/mmc/host/sh_mobile_sdhi.c
  67. 1 1
      drivers/mmc/host/tmio_mmc.c
  68. 0 2
      drivers/net/ethernet/intel/e1000e/netdev.c
  69. 1 5
      drivers/net/ethernet/intel/igb/igb_main.c
  70. 7 13
      drivers/pci/pci-driver.c
  71. 2 2
      drivers/pci/pci-sysfs.c
  72. 1 1
      drivers/pci/pcie/Kconfig
  73. 2 2
      drivers/sh/pm_runtime.c
  74. 1 1
      drivers/spi/spi-pl022.c
  75. 1 5
      drivers/usb/core/driver.c
  76. 0 11
      drivers/usb/core/hcd-pci.c
  77. 4 8
      drivers/usb/core/hcd.c
  78. 3 3
      drivers/usb/core/hub.c
  79. 2 2
      drivers/usb/core/port.c
  80. 4 9
      drivers/usb/core/sysfs.c
  81. 1 3
      drivers/usb/core/usb.c
  82. 9 14
      drivers/usb/core/usb.h
  83. 1 1
      drivers/usb/host/ehci-pci.c
  84. 2 3
      drivers/usb/host/sl811-hcd.c
  85. 1 2
      drivers/usb/host/u132-hcd.c
  86. 1 1
      drivers/usb/host/xhci-hub.c
  87. 12 17
      drivers/usb/host/xhci.c
  88. 1 1
      drivers/usb/phy/phy-msm-usb.c
  89. 1 5
      include/acpi/acpi_bus.h
  90. 11 15
      include/linux/acpi.h
  91. 2 2
      include/linux/blkdev.h
  92. 3 10
      include/linux/pm.h
  93. 2 6
      include/linux/pm_domain.h
  94. 17 21
      include/linux/pm_qos.h
  95. 9 12
      include/linux/pm_runtime.h
  96. 1 1
      include/linux/usb.h
  97. 2 5
      include/linux/usb/hcd.h
  98. 1 5
      kernel/power/Kconfig

+ 6 - 8
Documentation/ABI/stable/sysfs-bus-usb

@@ -32,10 +32,9 @@ Date:		January 2008
 KernelVersion:	2.6.25
 KernelVersion:	2.6.25
 Contact:	Sarah Sharp <sarah.a.sharp@intel.com>
 Contact:	Sarah Sharp <sarah.a.sharp@intel.com>
 Description:
 Description:
-		If CONFIG_PM_RUNTIME is enabled then this file
-		is present.  When read, it returns the total time (in msec)
-		that the USB device has been connected to the machine.  This
-		file is read-only.
+		If CONFIG_PM is enabled, then this file is present.  When read,
+		it returns the total time (in msec) that the USB device has been
+		connected to the machine.  This file is read-only.
 Users:
 Users:
 		PowerTOP <powertop@lists.01.org>
 		PowerTOP <powertop@lists.01.org>
 		https://01.org/powertop/
 		https://01.org/powertop/
@@ -45,10 +44,9 @@ Date:		January 2008
 KernelVersion:	2.6.25
 KernelVersion:	2.6.25
 Contact:	Sarah Sharp <sarah.a.sharp@intel.com>
 Contact:	Sarah Sharp <sarah.a.sharp@intel.com>
 Description:
 Description:
-		If CONFIG_PM_RUNTIME is enabled then this file
-		is present.  When read, it returns the total time (in msec)
-		that the USB device has been active, i.e. not in a suspended
-		state.  This file is read-only.
+		If CONFIG_PM is enabled, then this file is present.  When read,
+		it returns the total time (in msec) that the USB device has been
+		active, i.e. not in a suspended state.  This file is read-only.
 
 
 		Tools can use this file and the connected_duration file to
 		Tools can use this file and the connected_duration file to
 		compute the percentage of time that a device has been active.
 		compute the percentage of time that a device has been active.

+ 9 - 10
Documentation/ABI/testing/sysfs-bus-usb

@@ -104,16 +104,15 @@ What:		/sys/bus/usb/devices/.../power/usb2_hardware_lpm
 Date:		September 2011
 Date:		September 2011
 Contact:	Andiry Xu <andiry.xu@amd.com>
 Contact:	Andiry Xu <andiry.xu@amd.com>
 Description:
 Description:
-		If CONFIG_PM_RUNTIME is set and a USB 2.0 lpm-capable device
-		is plugged in to a xHCI host which support link PM, it will
-		perform a LPM test; if the test is passed and host supports
-		USB2 hardware LPM (xHCI 1.0 feature), USB2 hardware LPM will
-		be enabled for the device and the USB device directory will
-		contain a file named power/usb2_hardware_lpm.  The file holds
-		a string value (enable or disable) indicating whether or not
-		USB2 hardware LPM is enabled for the device. Developer can
-		write y/Y/1 or n/N/0 to the file to enable/disable the
-		feature.
+		If CONFIG_PM is set and a USB 2.0 lpm-capable device is plugged
+		in to a xHCI host which support link PM, it will perform a LPM
+		test; if the test is passed and host supports USB2 hardware LPM
+		(xHCI 1.0 feature), USB2 hardware LPM will be enabled for the
+		device and the USB device directory will contain a file named
+		power/usb2_hardware_lpm.  The file holds a string value (enable
+		or disable) indicating whether or not USB2 hardware LPM is
+		enabled for the device. Developer can write y/Y/1 or n/N/0 to
+		the file to enable/disable the feature.
 
 
 What:		/sys/bus/usb/devices/.../removable
 What:		/sys/bus/usb/devices/.../removable
 Date:		February 2012
 Date:		February 2012

+ 9 - 8
Documentation/usb/power-management.txt

@@ -47,14 +47,15 @@ dynamic PM is implemented in the USB subsystem, although system PM is
 covered to some extent (see Documentation/power/*.txt for more
 covered to some extent (see Documentation/power/*.txt for more
 information about system PM).
 information about system PM).
 
 
-Note: Dynamic PM support for USB is present only if the kernel was
-built with CONFIG_USB_SUSPEND enabled (which depends on
-CONFIG_PM_RUNTIME).  System PM support is present only if the kernel
-was built with CONFIG_SUSPEND or CONFIG_HIBERNATION enabled.
-
-(Starting with the 3.10 kernel release, dynamic PM support for USB is
-present whenever the kernel was built with CONFIG_PM_RUNTIME enabled.
-The CONFIG_USB_SUSPEND option has been eliminated.)
+System PM support is present only if the kernel was built with CONFIG_SUSPEND
+or CONFIG_HIBERNATION enabled.  Dynamic PM support for USB is present whenever
+the kernel was built with CONFIG_PM enabled.
+
+[Historically, dynamic PM support for USB was present only if the
+kernel had been built with CONFIG_USB_SUSPEND enabled (which depended on
+CONFIG_PM_RUNTIME).  Starting with the 3.10 kernel release, dynamic PM support
+for USB was present whenever the kernel was built with CONFIG_PM_RUNTIME
+enabled.  The CONFIG_USB_SUSPEND option had been eliminated.]
 
 
 
 
 	What is Remote Wakeup?
 	What is Remote Wakeup?

+ 1 - 1
arch/ia64/Kconfig

@@ -11,7 +11,6 @@ config IA64
 	select PCI if (!IA64_HP_SIM)
 	select PCI if (!IA64_HP_SIM)
 	select ACPI if (!IA64_HP_SIM)
 	select ACPI if (!IA64_HP_SIM)
 	select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI
 	select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI
-	select PM if (!IA64_HP_SIM)
 	select HAVE_UNSTABLE_SCHED_CLOCK
 	select HAVE_UNSTABLE_SCHED_CLOCK
 	select HAVE_IDE
 	select HAVE_IDE
 	select HAVE_OPROFILE
 	select HAVE_OPROFILE
@@ -233,6 +232,7 @@ config IA64_SGI_UV
 config IA64_HP_SIM
 config IA64_HP_SIM
 	bool "Ski-simulator"
 	bool "Ski-simulator"
 	select SWIOTLB
 	select SWIOTLB
+	depends on !PM_RUNTIME
 
 
 endchoice
 endchoice
 
 

+ 0 - 1
arch/sh/Kconfig

@@ -222,7 +222,6 @@ config CPU_SHX3
 config ARCH_SHMOBILE
 config ARCH_SHMOBILE
 	bool
 	bool
 	select ARCH_SUSPEND_POSSIBLE
 	select ARCH_SUSPEND_POSSIBLE
-	select PM
 	select PM_RUNTIME
 	select PM_RUNTIME
 
 
 config CPU_HAS_PMU
 config CPU_HAS_PMU

+ 3 - 3
block/blk-core.c

@@ -1325,7 +1325,7 @@ void part_round_stats(int cpu, struct hd_struct *part)
 }
 }
 EXPORT_SYMBOL_GPL(part_round_stats);
 EXPORT_SYMBOL_GPL(part_round_stats);
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static void blk_pm_put_request(struct request *rq)
 static void blk_pm_put_request(struct request *rq)
 {
 {
 	if (rq->q->dev && !(rq->cmd_flags & REQ_PM) && !--rq->q->nr_pending)
 	if (rq->q->dev && !(rq->cmd_flags & REQ_PM) && !--rq->q->nr_pending)
@@ -2134,7 +2134,7 @@ void blk_account_io_done(struct request *req)
 	}
 	}
 }
 }
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 /*
 /*
  * Don't process normal requests when queue is suspended
  * Don't process normal requests when queue is suspended
  * or in the process of suspending/resuming
  * or in the process of suspending/resuming
@@ -3159,7 +3159,7 @@ void blk_finish_plug(struct blk_plug *plug)
 }
 }
 EXPORT_SYMBOL(blk_finish_plug);
 EXPORT_SYMBOL(blk_finish_plug);
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 /**
 /**
  * blk_pm_runtime_init - Block layer runtime PM initialization routine
  * blk_pm_runtime_init - Block layer runtime PM initialization routine
  * @q: the queue of the device
  * @q: the queue of the device

+ 1 - 1
block/elevator.c

@@ -539,7 +539,7 @@ void elv_bio_merged(struct request_queue *q, struct request *rq,
 		e->type->ops.elevator_bio_merged_fn(q, rq, bio);
 		e->type->ops.elevator_bio_merged_fn(q, rq, bio);
 }
 }
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static void blk_pm_requeue_request(struct request *rq)
 static void blk_pm_requeue_request(struct request *rq)
 {
 {
 	if (rq->q->dev && !(rq->cmd_flags & REQ_PM))
 	if (rq->q->dev && !(rq->cmd_flags & REQ_PM))

+ 1 - 3
drivers/acpi/acpi_lpss.c

@@ -588,7 +588,6 @@ static int acpi_lpss_resume_early(struct device *dev)
 }
 }
 #endif /* CONFIG_PM_SLEEP */
 #endif /* CONFIG_PM_SLEEP */
 
 
-#ifdef CONFIG_PM_RUNTIME
 static int acpi_lpss_runtime_suspend(struct device *dev)
 static int acpi_lpss_runtime_suspend(struct device *dev)
 {
 {
 	struct lpss_private_data *pdata = acpi_driver_data(ACPI_COMPANION(dev));
 	struct lpss_private_data *pdata = acpi_driver_data(ACPI_COMPANION(dev));
@@ -631,11 +630,11 @@ static int acpi_lpss_runtime_resume(struct device *dev)
 
 
 	return pm_generic_runtime_resume(dev);
 	return pm_generic_runtime_resume(dev);
 }
 }
-#endif /* CONFIG_PM_RUNTIME */
 #endif /* CONFIG_PM */
 #endif /* CONFIG_PM */
 
 
 static struct dev_pm_domain acpi_lpss_pm_domain = {
 static struct dev_pm_domain acpi_lpss_pm_domain = {
 	.ops = {
 	.ops = {
+#ifdef CONFIG_PM
 #ifdef CONFIG_PM_SLEEP
 #ifdef CONFIG_PM_SLEEP
 		.prepare = acpi_subsys_prepare,
 		.prepare = acpi_subsys_prepare,
 		.complete = acpi_subsys_complete,
 		.complete = acpi_subsys_complete,
@@ -647,7 +646,6 @@ static struct dev_pm_domain acpi_lpss_pm_domain = {
 		.poweroff_late = acpi_lpss_suspend_late,
 		.poweroff_late = acpi_lpss_suspend_late,
 		.restore_early = acpi_lpss_resume_early,
 		.restore_early = acpi_lpss_resume_early,
 #endif
 #endif
-#ifdef CONFIG_PM_RUNTIME
 		.runtime_suspend = acpi_lpss_runtime_suspend,
 		.runtime_suspend = acpi_lpss_runtime_suspend,
 		.runtime_resume = acpi_lpss_runtime_resume,
 		.runtime_resume = acpi_lpss_runtime_resume,
 #endif
 #endif

+ 2 - 6
drivers/acpi/device_pm.c

@@ -692,7 +692,6 @@ static int acpi_device_wakeup(struct acpi_device *adev, u32 target_state,
 	return 0;
 	return 0;
 }
 }
 
 
-#ifdef CONFIG_PM_RUNTIME
 /**
 /**
  * acpi_pm_device_run_wake - Enable/disable remote wakeup for given device.
  * acpi_pm_device_run_wake - Enable/disable remote wakeup for given device.
  * @dev: Device to enable/disable the platform to wake up.
  * @dev: Device to enable/disable the platform to wake up.
@@ -714,7 +713,6 @@ int acpi_pm_device_run_wake(struct device *phys_dev, bool enable)
 	return acpi_device_wakeup(adev, ACPI_STATE_S0, enable);
 	return acpi_device_wakeup(adev, ACPI_STATE_S0, enable);
 }
 }
 EXPORT_SYMBOL(acpi_pm_device_run_wake);
 EXPORT_SYMBOL(acpi_pm_device_run_wake);
-#endif /* CONFIG_PM_RUNTIME */
 
 
 #ifdef CONFIG_PM_SLEEP
 #ifdef CONFIG_PM_SLEEP
 /**
 /**
@@ -773,7 +771,6 @@ static int acpi_dev_pm_full_power(struct acpi_device *adev)
 		acpi_device_set_power(adev, ACPI_STATE_D0) : 0;
 		acpi_device_set_power(adev, ACPI_STATE_D0) : 0;
 }
 }
 
 
-#ifdef CONFIG_PM_RUNTIME
 /**
 /**
  * acpi_dev_runtime_suspend - Put device into a low-power state using ACPI.
  * acpi_dev_runtime_suspend - Put device into a low-power state using ACPI.
  * @dev: Device to put into a low-power state.
  * @dev: Device to put into a low-power state.
@@ -855,7 +852,6 @@ int acpi_subsys_runtime_resume(struct device *dev)
 	return ret ? ret : pm_generic_runtime_resume(dev);
 	return ret ? ret : pm_generic_runtime_resume(dev);
 }
 }
 EXPORT_SYMBOL_GPL(acpi_subsys_runtime_resume);
 EXPORT_SYMBOL_GPL(acpi_subsys_runtime_resume);
-#endif /* CONFIG_PM_RUNTIME */
 
 
 #ifdef CONFIG_PM_SLEEP
 #ifdef CONFIG_PM_SLEEP
 /**
 /**
@@ -1023,10 +1019,9 @@ EXPORT_SYMBOL_GPL(acpi_subsys_freeze);
 
 
 static struct dev_pm_domain acpi_general_pm_domain = {
 static struct dev_pm_domain acpi_general_pm_domain = {
 	.ops = {
 	.ops = {
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 		.runtime_suspend = acpi_subsys_runtime_suspend,
 		.runtime_suspend = acpi_subsys_runtime_suspend,
 		.runtime_resume = acpi_subsys_runtime_resume,
 		.runtime_resume = acpi_subsys_runtime_resume,
-#endif
 #ifdef CONFIG_PM_SLEEP
 #ifdef CONFIG_PM_SLEEP
 		.prepare = acpi_subsys_prepare,
 		.prepare = acpi_subsys_prepare,
 		.complete = acpi_subsys_complete,
 		.complete = acpi_subsys_complete,
@@ -1037,6 +1032,7 @@ static struct dev_pm_domain acpi_general_pm_domain = {
 		.poweroff = acpi_subsys_suspend,
 		.poweroff = acpi_subsys_suspend,
 		.poweroff_late = acpi_subsys_suspend_late,
 		.poweroff_late = acpi_subsys_suspend_late,
 		.restore_early = acpi_subsys_resume_early,
 		.restore_early = acpi_subsys_resume_early,
+#endif
 #endif
 #endif
 	},
 	},
 };
 };

+ 1 - 1
drivers/acpi/pci_irq.c

@@ -484,7 +484,7 @@ void acpi_pci_irq_disable(struct pci_dev *dev)
 	/* Keep IOAPIC pin configuration when suspending */
 	/* Keep IOAPIC pin configuration when suspending */
 	if (dev->dev.power.is_prepared)
 	if (dev->dev.power.is_prepared)
 		return;
 		return;
-#ifdef	CONFIG_PM_RUNTIME
+#ifdef	CONFIG_PM
 	if (dev->dev.power.runtime_status == RPM_SUSPENDING)
 	if (dev->dev.power.runtime_status == RPM_SUSPENDING)
 		return;
 		return;
 #endif
 #endif

+ 1 - 1
drivers/amba/bus.c

@@ -124,7 +124,7 @@ static const struct dev_pm_ops amba_pm = {
 	.thaw		= pm_generic_thaw,
 	.thaw		= pm_generic_thaw,
 	.poweroff	= pm_generic_poweroff,
 	.poweroff	= pm_generic_poweroff,
 	.restore	= pm_generic_restore,
 	.restore	= pm_generic_restore,
-	SET_PM_RUNTIME_PM_OPS(
+	SET_RUNTIME_PM_OPS(
 		amba_pm_runtime_suspend,
 		amba_pm_runtime_suspend,
 		amba_pm_runtime_resume,
 		amba_pm_runtime_resume,
 		NULL
 		NULL

+ 2 - 67
drivers/base/power/clock_ops.c

@@ -256,10 +256,6 @@ void pm_clk_destroy(struct device *dev)
 	}
 	}
 }
 }
 
 
-#endif /* CONFIG_PM */
-
-#ifdef CONFIG_PM_RUNTIME
-
 /**
 /**
  * pm_clk_suspend - Disable clocks in a device's PM clock list.
  * pm_clk_suspend - Disable clocks in a device's PM clock list.
  * @dev: Device to disable the clocks for.
  * @dev: Device to disable the clocks for.
@@ -373,68 +369,7 @@ static int pm_clk_notify(struct notifier_block *nb,
 	return 0;
 	return 0;
 }
 }
 
 
-#else /* !CONFIG_PM_RUNTIME */
-
-#ifdef CONFIG_PM
-
-/**
- * pm_clk_suspend - Disable clocks in a device's PM clock list.
- * @dev: Device to disable the clocks for.
- */
-int pm_clk_suspend(struct device *dev)
-{
-	struct pm_subsys_data *psd = dev_to_psd(dev);
-	struct pm_clock_entry *ce;
-	unsigned long flags;
-
-	dev_dbg(dev, "%s()\n", __func__);
-
-	/* If there is no driver, the clocks are already disabled. */
-	if (!psd || !dev->driver)
-		return 0;
-
-	spin_lock_irqsave(&psd->lock, flags);
-
-	list_for_each_entry_reverse(ce, &psd->clock_list, node) {
-		if (ce->status < PCE_STATUS_ERROR) {
-			if (ce->status == PCE_STATUS_ENABLED)
-				clk_disable(ce->clk);
-			ce->status = PCE_STATUS_ACQUIRED;
-		}
-	}
-
-	spin_unlock_irqrestore(&psd->lock, flags);
-
-	return 0;
-}
-
-/**
- * pm_clk_resume - Enable clocks in a device's PM clock list.
- * @dev: Device to enable the clocks for.
- */
-int pm_clk_resume(struct device *dev)
-{
-	struct pm_subsys_data *psd = dev_to_psd(dev);
-	struct pm_clock_entry *ce;
-	unsigned long flags;
-
-	dev_dbg(dev, "%s()\n", __func__);
-
-	/* If there is no driver, the clocks should remain disabled. */
-	if (!psd || !dev->driver)
-		return 0;
-
-	spin_lock_irqsave(&psd->lock, flags);
-
-	list_for_each_entry(ce, &psd->clock_list, node)
-		__pm_clk_enable(dev, ce);
-
-	spin_unlock_irqrestore(&psd->lock, flags);
-
-	return 0;
-}
-
-#endif /* CONFIG_PM */
+#else /* !CONFIG_PM */
 
 
 /**
 /**
  * enable_clock - Enable a device clock.
  * enable_clock - Enable a device clock.
@@ -514,7 +449,7 @@ static int pm_clk_notify(struct notifier_block *nb,
 	return 0;
 	return 0;
 }
 }
 
 
-#endif /* !CONFIG_PM_RUNTIME */
+#endif /* !CONFIG_PM */
 
 
 /**
 /**
  * pm_clk_add_notifier - Add bus type notifier for power management clocks.
  * pm_clk_add_notifier - Add bus type notifier for power management clocks.

+ 3 - 31
drivers/base/power/domain.c

@@ -318,8 +318,6 @@ int pm_genpd_name_poweron(const char *domain_name)
 	return genpd ? pm_genpd_poweron(genpd) : -EINVAL;
 	return genpd ? pm_genpd_poweron(genpd) : -EINVAL;
 }
 }
 
 
-#ifdef CONFIG_PM_RUNTIME
-
 static int genpd_start_dev_no_timing(struct generic_pm_domain *genpd,
 static int genpd_start_dev_no_timing(struct generic_pm_domain *genpd,
 				     struct device *dev)
 				     struct device *dev)
 {
 {
@@ -778,24 +776,6 @@ static int __init genpd_poweroff_unused(void)
 }
 }
 late_initcall(genpd_poweroff_unused);
 late_initcall(genpd_poweroff_unused);
 
 
-#else
-
-static inline int genpd_dev_pm_qos_notifier(struct notifier_block *nb,
-					    unsigned long val, void *ptr)
-{
-	return NOTIFY_DONE;
-}
-
-static inline void
-genpd_queue_power_off_work(struct generic_pm_domain *genpd) {}
-
-static inline void genpd_power_off_work_fn(struct work_struct *work) {}
-
-#define pm_genpd_runtime_suspend	NULL
-#define pm_genpd_runtime_resume		NULL
-
-#endif /* CONFIG_PM_RUNTIME */
-
 #ifdef CONFIG_PM_SLEEP
 #ifdef CONFIG_PM_SLEEP
 
 
 /**
 /**
@@ -1384,7 +1364,7 @@ void pm_genpd_syscore_poweron(struct device *dev)
 }
 }
 EXPORT_SYMBOL_GPL(pm_genpd_syscore_poweron);
 EXPORT_SYMBOL_GPL(pm_genpd_syscore_poweron);
 
 
-#else
+#else /* !CONFIG_PM_SLEEP */
 
 
 #define pm_genpd_prepare		NULL
 #define pm_genpd_prepare		NULL
 #define pm_genpd_suspend		NULL
 #define pm_genpd_suspend		NULL
@@ -2247,7 +2227,7 @@ int genpd_dev_pm_attach(struct device *dev)
 	return 0;
 	return 0;
 }
 }
 EXPORT_SYMBOL_GPL(genpd_dev_pm_attach);
 EXPORT_SYMBOL_GPL(genpd_dev_pm_attach);
-#endif
+#endif /* CONFIG_PM_GENERIC_DOMAINS_OF */
 
 
 
 
 /***        debugfs support        ***/
 /***        debugfs support        ***/
@@ -2263,10 +2243,8 @@ static struct dentry *pm_genpd_debugfs_dir;
 
 
 /*
 /*
  * TODO: This function is a slightly modified version of rtpm_status_show
  * TODO: This function is a slightly modified version of rtpm_status_show
- * from sysfs.c, but dependencies between PM_GENERIC_DOMAINS and PM_RUNTIME
- * are too loose to generalize it.
+ * from sysfs.c, so generalize it.
  */
  */
-#ifdef CONFIG_PM_RUNTIME
 static void rtpm_status_str(struct seq_file *s, struct device *dev)
 static void rtpm_status_str(struct seq_file *s, struct device *dev)
 {
 {
 	static const char * const status_lookup[] = {
 	static const char * const status_lookup[] = {
@@ -2288,12 +2266,6 @@ static void rtpm_status_str(struct seq_file *s, struct device *dev)
 
 
 	seq_puts(s, p);
 	seq_puts(s, p);
 }
 }
-#else
-static void rtpm_status_str(struct seq_file *s, struct device *dev)
-{
-	seq_puts(s, "active");
-}
-#endif
 
 
 static int pm_genpd_summary_one(struct seq_file *s,
 static int pm_genpd_summary_one(struct seq_file *s,
 		struct generic_pm_domain *gpd)
 		struct generic_pm_domain *gpd)

+ 0 - 11
drivers/base/power/domain_governor.c

@@ -11,8 +11,6 @@
 #include <linux/pm_qos.h>
 #include <linux/pm_qos.h>
 #include <linux/hrtimer.h>
 #include <linux/hrtimer.h>
 
 
-#ifdef CONFIG_PM_RUNTIME
-
 static int dev_update_qos_constraint(struct device *dev, void *data)
 static int dev_update_qos_constraint(struct device *dev, void *data)
 {
 {
 	s64 *constraint_ns_p = data;
 	s64 *constraint_ns_p = data;
@@ -227,15 +225,6 @@ static bool always_on_power_down_ok(struct dev_pm_domain *domain)
 	return false;
 	return false;
 }
 }
 
 
-#else /* !CONFIG_PM_RUNTIME */
-
-static inline bool default_stop_ok(struct device *dev) { return false; }
-
-#define default_power_down_ok	NULL
-#define always_on_power_down_ok	NULL
-
-#endif /* !CONFIG_PM_RUNTIME */
-
 struct dev_power_governor simple_qos_governor = {
 struct dev_power_governor simple_qos_governor = {
 	.stop_ok = default_stop_ok,
 	.stop_ok = default_stop_ok,
 	.power_down_ok = default_power_down_ok,
 	.power_down_ok = default_power_down_ok,

+ 25 - 31
drivers/base/power/power.h

@@ -9,7 +9,7 @@ static inline void device_pm_init_common(struct device *dev)
 	}
 	}
 }
 }
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 
 
 static inline void pm_runtime_early_init(struct device *dev)
 static inline void pm_runtime_early_init(struct device *dev)
 {
 {
@@ -20,7 +20,21 @@ static inline void pm_runtime_early_init(struct device *dev)
 extern void pm_runtime_init(struct device *dev);
 extern void pm_runtime_init(struct device *dev);
 extern void pm_runtime_remove(struct device *dev);
 extern void pm_runtime_remove(struct device *dev);
 
 
-#else /* !CONFIG_PM_RUNTIME */
+/*
+ * sysfs.c
+ */
+
+extern int dpm_sysfs_add(struct device *dev);
+extern void dpm_sysfs_remove(struct device *dev);
+extern void rpm_sysfs_remove(struct device *dev);
+extern int wakeup_sysfs_add(struct device *dev);
+extern void wakeup_sysfs_remove(struct device *dev);
+extern int pm_qos_sysfs_add_resume_latency(struct device *dev);
+extern void pm_qos_sysfs_remove_resume_latency(struct device *dev);
+extern int pm_qos_sysfs_add_flags(struct device *dev);
+extern void pm_qos_sysfs_remove_flags(struct device *dev);
+
+#else /* CONFIG_PM */
 
 
 static inline void pm_runtime_early_init(struct device *dev)
 static inline void pm_runtime_early_init(struct device *dev)
 {
 {
@@ -30,7 +44,15 @@ static inline void pm_runtime_early_init(struct device *dev)
 static inline void pm_runtime_init(struct device *dev) {}
 static inline void pm_runtime_init(struct device *dev) {}
 static inline void pm_runtime_remove(struct device *dev) {}
 static inline void pm_runtime_remove(struct device *dev) {}
 
 
-#endif /* !CONFIG_PM_RUNTIME */
+static inline int dpm_sysfs_add(struct device *dev) { return 0; }
+static inline void dpm_sysfs_remove(struct device *dev) {}
+static inline void rpm_sysfs_remove(struct device *dev) {}
+static inline int wakeup_sysfs_add(struct device *dev) { return 0; }
+static inline void wakeup_sysfs_remove(struct device *dev) {}
+static inline int pm_qos_sysfs_add(struct device *dev) { return 0; }
+static inline void pm_qos_sysfs_remove(struct device *dev) {}
+
+#endif
 
 
 #ifdef CONFIG_PM_SLEEP
 #ifdef CONFIG_PM_SLEEP
 
 
@@ -77,31 +99,3 @@ static inline void device_pm_init(struct device *dev)
 	device_pm_sleep_init(dev);
 	device_pm_sleep_init(dev);
 	pm_runtime_init(dev);
 	pm_runtime_init(dev);
 }
 }
-
-#ifdef CONFIG_PM
-
-/*
- * sysfs.c
- */
-
-extern int dpm_sysfs_add(struct device *dev);
-extern void dpm_sysfs_remove(struct device *dev);
-extern void rpm_sysfs_remove(struct device *dev);
-extern int wakeup_sysfs_add(struct device *dev);
-extern void wakeup_sysfs_remove(struct device *dev);
-extern int pm_qos_sysfs_add_resume_latency(struct device *dev);
-extern void pm_qos_sysfs_remove_resume_latency(struct device *dev);
-extern int pm_qos_sysfs_add_flags(struct device *dev);
-extern void pm_qos_sysfs_remove_flags(struct device *dev);
-
-#else /* CONFIG_PM */
-
-static inline int dpm_sysfs_add(struct device *dev) { return 0; }
-static inline void dpm_sysfs_remove(struct device *dev) {}
-static inline void rpm_sysfs_remove(struct device *dev) {}
-static inline int wakeup_sysfs_add(struct device *dev) { return 0; }
-static inline void wakeup_sysfs_remove(struct device *dev) {}
-static inline int pm_qos_sysfs_add(struct device *dev) { return 0; }
-static inline void pm_qos_sysfs_remove(struct device *dev) {}
-
-#endif

+ 0 - 5
drivers/base/power/qos.c

@@ -599,7 +599,6 @@ int dev_pm_qos_add_ancestor_request(struct device *dev,
 }
 }
 EXPORT_SYMBOL_GPL(dev_pm_qos_add_ancestor_request);
 EXPORT_SYMBOL_GPL(dev_pm_qos_add_ancestor_request);
 
 
-#ifdef CONFIG_PM_RUNTIME
 static void __dev_pm_qos_drop_user_request(struct device *dev,
 static void __dev_pm_qos_drop_user_request(struct device *dev,
 					   enum dev_pm_qos_req_type type)
 					   enum dev_pm_qos_req_type type)
 {
 {
@@ -880,7 +879,3 @@ int dev_pm_qos_update_user_latency_tolerance(struct device *dev, s32 val)
 	mutex_unlock(&dev_pm_qos_mtx);
 	mutex_unlock(&dev_pm_qos_mtx);
 	return ret;
 	return ret;
 }
 }
-#else /* !CONFIG_PM_RUNTIME */
-static void __dev_pm_qos_hide_latency_limit(struct device *dev) {}
-static void __dev_pm_qos_hide_flags(struct device *dev) {}
-#endif /* CONFIG_PM_RUNTIME */

+ 32 - 44
drivers/base/power/runtime.c

@@ -13,43 +13,38 @@
 #include <trace/events/rpm.h>
 #include <trace/events/rpm.h>
 #include "power.h"
 #include "power.h"
 
 
-#define RPM_GET_CALLBACK(dev, cb)				\
-({								\
-	int (*__rpm_cb)(struct device *__d);			\
-								\
-	if (dev->pm_domain)					\
-		__rpm_cb = dev->pm_domain->ops.cb;		\
-	else if (dev->type && dev->type->pm)			\
-		__rpm_cb = dev->type->pm->cb;			\
-	else if (dev->class && dev->class->pm)			\
-		__rpm_cb = dev->class->pm->cb;			\
-	else if (dev->bus && dev->bus->pm)			\
-		__rpm_cb = dev->bus->pm->cb;			\
-	else							\
-		__rpm_cb = NULL;				\
-								\
-	if (!__rpm_cb && dev->driver && dev->driver->pm)	\
-		__rpm_cb = dev->driver->pm->cb;			\
-								\
-	__rpm_cb;						\
-})
-
-static int (*rpm_get_suspend_cb(struct device *dev))(struct device *)
-{
-	return RPM_GET_CALLBACK(dev, runtime_suspend);
-}
+typedef int (*pm_callback_t)(struct device *);
 
 
-static int (*rpm_get_resume_cb(struct device *dev))(struct device *)
+static pm_callback_t __rpm_get_callback(struct device *dev, size_t cb_offset)
 {
 {
-	return RPM_GET_CALLBACK(dev, runtime_resume);
-}
+	pm_callback_t cb;
+	const struct dev_pm_ops *ops;
+
+	if (dev->pm_domain)
+		ops = &dev->pm_domain->ops;
+	else if (dev->type && dev->type->pm)
+		ops = dev->type->pm;
+	else if (dev->class && dev->class->pm)
+		ops = dev->class->pm;
+	else if (dev->bus && dev->bus->pm)
+		ops = dev->bus->pm;
+	else
+		ops = NULL;
 
 
-#ifdef CONFIG_PM_RUNTIME
-static int (*rpm_get_idle_cb(struct device *dev))(struct device *)
-{
-	return RPM_GET_CALLBACK(dev, runtime_idle);
+	if (ops)
+		cb = *(pm_callback_t *)((void *)ops + cb_offset);
+	else
+		cb = NULL;
+
+	if (!cb && dev->driver && dev->driver->pm)
+		cb = *(pm_callback_t *)((void *)dev->driver->pm + cb_offset);
+
+	return cb;
 }
 }
 
 
+#define RPM_GET_CALLBACK(dev, callback) \
+		__rpm_get_callback(dev, offsetof(struct dev_pm_ops, callback))
+
 static int rpm_resume(struct device *dev, int rpmflags);
 static int rpm_resume(struct device *dev, int rpmflags);
 static int rpm_suspend(struct device *dev, int rpmflags);
 static int rpm_suspend(struct device *dev, int rpmflags);
 
 
@@ -347,7 +342,7 @@ static int rpm_idle(struct device *dev, int rpmflags)
 
 
 	dev->power.idle_notification = true;
 	dev->power.idle_notification = true;
 
 
-	callback = rpm_get_idle_cb(dev);
+	callback = RPM_GET_CALLBACK(dev, runtime_idle);
 
 
 	if (callback)
 	if (callback)
 		retval = __rpm_callback(callback, dev);
 		retval = __rpm_callback(callback, dev);
@@ -517,7 +512,7 @@ static int rpm_suspend(struct device *dev, int rpmflags)
 
 
 	__update_runtime_status(dev, RPM_SUSPENDING);
 	__update_runtime_status(dev, RPM_SUSPENDING);
 
 
-	callback = rpm_get_suspend_cb(dev);
+	callback = RPM_GET_CALLBACK(dev, runtime_suspend);
 
 
 	retval = rpm_callback(callback, dev);
 	retval = rpm_callback(callback, dev);
 	if (retval)
 	if (retval)
@@ -737,7 +732,7 @@ static int rpm_resume(struct device *dev, int rpmflags)
 
 
 	__update_runtime_status(dev, RPM_RESUMING);
 	__update_runtime_status(dev, RPM_RESUMING);
 
 
-	callback = rpm_get_resume_cb(dev);
+	callback = RPM_GET_CALLBACK(dev, runtime_resume);
 
 
 	retval = rpm_callback(callback, dev);
 	retval = rpm_callback(callback, dev);
 	if (retval) {
 	if (retval) {
@@ -1402,7 +1397,6 @@ void pm_runtime_remove(struct device *dev)
 	if (dev->power.irq_safe && dev->parent)
 	if (dev->power.irq_safe && dev->parent)
 		pm_runtime_put(dev->parent);
 		pm_runtime_put(dev->parent);
 }
 }
-#endif
 
 
 /**
 /**
  * pm_runtime_force_suspend - Force a device into suspend state if needed.
  * pm_runtime_force_suspend - Force a device into suspend state if needed.
@@ -1422,16 +1416,10 @@ int pm_runtime_force_suspend(struct device *dev)
 	int ret = 0;
 	int ret = 0;
 
 
 	pm_runtime_disable(dev);
 	pm_runtime_disable(dev);
-
-	/*
-	 * Note that pm_runtime_status_suspended() returns false while
-	 * !CONFIG_PM_RUNTIME, which means the device will be put into low
-	 * power state.
-	 */
 	if (pm_runtime_status_suspended(dev))
 	if (pm_runtime_status_suspended(dev))
 		return 0;
 		return 0;
 
 
-	callback = rpm_get_suspend_cb(dev);
+	callback = RPM_GET_CALLBACK(dev, runtime_suspend);
 
 
 	if (!callback) {
 	if (!callback) {
 		ret = -ENOSYS;
 		ret = -ENOSYS;
@@ -1467,7 +1455,7 @@ int pm_runtime_force_resume(struct device *dev)
 	int (*callback)(struct device *);
 	int (*callback)(struct device *);
 	int ret = 0;
 	int ret = 0;
 
 
-	callback = rpm_get_resume_cb(dev);
+	callback = RPM_GET_CALLBACK(dev, runtime_resume);
 
 
 	if (!callback) {
 	if (!callback) {
 		ret = -ENOSYS;
 		ret = -ENOSYS;

+ 1 - 18
drivers/base/power/sysfs.c

@@ -95,7 +95,6 @@
 const char power_group_name[] = "power";
 const char power_group_name[] = "power";
 EXPORT_SYMBOL_GPL(power_group_name);
 EXPORT_SYMBOL_GPL(power_group_name);
 
 
-#ifdef CONFIG_PM_RUNTIME
 static const char ctrl_auto[] = "auto";
 static const char ctrl_auto[] = "auto";
 static const char ctrl_on[] = "on";
 static const char ctrl_on[] = "on";
 
 
@@ -330,7 +329,6 @@ static ssize_t pm_qos_remote_wakeup_store(struct device *dev,
 
 
 static DEVICE_ATTR(pm_qos_remote_wakeup, 0644,
 static DEVICE_ATTR(pm_qos_remote_wakeup, 0644,
 		   pm_qos_remote_wakeup_show, pm_qos_remote_wakeup_store);
 		   pm_qos_remote_wakeup_show, pm_qos_remote_wakeup_store);
-#endif /* CONFIG_PM_RUNTIME */
 
 
 #ifdef CONFIG_PM_SLEEP
 #ifdef CONFIG_PM_SLEEP
 static const char _enabled[] = "enabled";
 static const char _enabled[] = "enabled";
@@ -531,8 +529,6 @@ static DEVICE_ATTR(wakeup_prevent_sleep_time_ms, 0444,
 #endif /* CONFIG_PM_SLEEP */
 #endif /* CONFIG_PM_SLEEP */
 
 
 #ifdef CONFIG_PM_ADVANCED_DEBUG
 #ifdef CONFIG_PM_ADVANCED_DEBUG
-#ifdef CONFIG_PM_RUNTIME
-
 static ssize_t rtpm_usagecount_show(struct device *dev,
 static ssize_t rtpm_usagecount_show(struct device *dev,
 				    struct device_attribute *attr, char *buf)
 				    struct device_attribute *attr, char *buf)
 {
 {
@@ -562,10 +558,7 @@ static DEVICE_ATTR(runtime_usage, 0444, rtpm_usagecount_show, NULL);
 static DEVICE_ATTR(runtime_active_kids, 0444, rtpm_children_show, NULL);
 static DEVICE_ATTR(runtime_active_kids, 0444, rtpm_children_show, NULL);
 static DEVICE_ATTR(runtime_enabled, 0444, rtpm_enabled_show, NULL);
 static DEVICE_ATTR(runtime_enabled, 0444, rtpm_enabled_show, NULL);
 
 
-#endif
-
 #ifdef CONFIG_PM_SLEEP
 #ifdef CONFIG_PM_SLEEP
-
 static ssize_t async_show(struct device *dev, struct device_attribute *attr,
 static ssize_t async_show(struct device *dev, struct device_attribute *attr,
 			  char *buf)
 			  char *buf)
 {
 {
@@ -595,7 +588,7 @@ static ssize_t async_store(struct device *dev, struct device_attribute *attr,
 
 
 static DEVICE_ATTR(async, 0644, async_show, async_store);
 static DEVICE_ATTR(async, 0644, async_show, async_store);
 
 
-#endif
+#endif /* CONFIG_PM_SLEEP */
 #endif /* CONFIG_PM_ADVANCED_DEBUG */
 #endif /* CONFIG_PM_ADVANCED_DEBUG */
 
 
 static struct attribute *power_attrs[] = {
 static struct attribute *power_attrs[] = {
@@ -603,12 +596,10 @@ static struct attribute *power_attrs[] = {
 #ifdef CONFIG_PM_SLEEP
 #ifdef CONFIG_PM_SLEEP
 	&dev_attr_async.attr,
 	&dev_attr_async.attr,
 #endif
 #endif
-#ifdef CONFIG_PM_RUNTIME
 	&dev_attr_runtime_status.attr,
 	&dev_attr_runtime_status.attr,
 	&dev_attr_runtime_usage.attr,
 	&dev_attr_runtime_usage.attr,
 	&dev_attr_runtime_active_kids.attr,
 	&dev_attr_runtime_active_kids.attr,
 	&dev_attr_runtime_enabled.attr,
 	&dev_attr_runtime_enabled.attr,
-#endif
 #endif /* CONFIG_PM_ADVANCED_DEBUG */
 #endif /* CONFIG_PM_ADVANCED_DEBUG */
 	NULL,
 	NULL,
 };
 };
@@ -640,7 +631,6 @@ static struct attribute_group pm_wakeup_attr_group = {
 };
 };
 
 
 static struct attribute *runtime_attrs[] = {
 static struct attribute *runtime_attrs[] = {
-#ifdef CONFIG_PM_RUNTIME
 #ifndef CONFIG_PM_ADVANCED_DEBUG
 #ifndef CONFIG_PM_ADVANCED_DEBUG
 	&dev_attr_runtime_status.attr,
 	&dev_attr_runtime_status.attr,
 #endif
 #endif
@@ -648,7 +638,6 @@ static struct attribute *runtime_attrs[] = {
 	&dev_attr_runtime_suspended_time.attr,
 	&dev_attr_runtime_suspended_time.attr,
 	&dev_attr_runtime_active_time.attr,
 	&dev_attr_runtime_active_time.attr,
 	&dev_attr_autosuspend_delay_ms.attr,
 	&dev_attr_autosuspend_delay_ms.attr,
-#endif /* CONFIG_PM_RUNTIME */
 	NULL,
 	NULL,
 };
 };
 static struct attribute_group pm_runtime_attr_group = {
 static struct attribute_group pm_runtime_attr_group = {
@@ -657,9 +646,7 @@ static struct attribute_group pm_runtime_attr_group = {
 };
 };
 
 
 static struct attribute *pm_qos_resume_latency_attrs[] = {
 static struct attribute *pm_qos_resume_latency_attrs[] = {
-#ifdef CONFIG_PM_RUNTIME
 	&dev_attr_pm_qos_resume_latency_us.attr,
 	&dev_attr_pm_qos_resume_latency_us.attr,
-#endif /* CONFIG_PM_RUNTIME */
 	NULL,
 	NULL,
 };
 };
 static struct attribute_group pm_qos_resume_latency_attr_group = {
 static struct attribute_group pm_qos_resume_latency_attr_group = {
@@ -668,9 +655,7 @@ static struct attribute_group pm_qos_resume_latency_attr_group = {
 };
 };
 
 
 static struct attribute *pm_qos_latency_tolerance_attrs[] = {
 static struct attribute *pm_qos_latency_tolerance_attrs[] = {
-#ifdef CONFIG_PM_RUNTIME
 	&dev_attr_pm_qos_latency_tolerance_us.attr,
 	&dev_attr_pm_qos_latency_tolerance_us.attr,
-#endif /* CONFIG_PM_RUNTIME */
 	NULL,
 	NULL,
 };
 };
 static struct attribute_group pm_qos_latency_tolerance_attr_group = {
 static struct attribute_group pm_qos_latency_tolerance_attr_group = {
@@ -679,10 +664,8 @@ static struct attribute_group pm_qos_latency_tolerance_attr_group = {
 };
 };
 
 
 static struct attribute *pm_qos_flags_attrs[] = {
 static struct attribute *pm_qos_flags_attrs[] = {
-#ifdef CONFIG_PM_RUNTIME
 	&dev_attr_pm_qos_no_power_off.attr,
 	&dev_attr_pm_qos_no_power_off.attr,
 	&dev_attr_pm_qos_remote_wakeup.attr,
 	&dev_attr_pm_qos_remote_wakeup.attr,
-#endif /* CONFIG_PM_RUNTIME */
 	NULL,
 	NULL,
 };
 };
 static struct attribute_group pm_qos_flags_attr_group = {
 static struct attribute_group pm_qos_flags_attr_group = {

+ 1 - 1
drivers/char/hw_random/exynos-rng.c

@@ -143,7 +143,7 @@ static int exynos_rng_remove(struct platform_device *pdev)
 	return 0;
 	return 0;
 }
 }
 
 
-#if defined(CONFIG_PM_SLEEP) || defined(CONFIG_PM_RUNTIME)
+#ifdef CONFIG_PM
 static int exynos_rng_runtime_suspend(struct device *dev)
 static int exynos_rng_runtime_suspend(struct device *dev)
 {
 {
 	struct platform_device *pdev = to_platform_device(dev);
 	struct platform_device *pdev = to_platform_device(dev);

+ 1 - 1
drivers/dma/nbpfaxi.c

@@ -1479,7 +1479,7 @@ static struct platform_device_id nbpf_ids[] = {
 };
 };
 MODULE_DEVICE_TABLE(platform, nbpf_ids);
 MODULE_DEVICE_TABLE(platform, nbpf_ids);
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int nbpf_runtime_suspend(struct device *dev)
 static int nbpf_runtime_suspend(struct device *dev)
 {
 {
 	struct nbpf_device *nbpf = platform_get_drvdata(to_platform_device(dev));
 	struct nbpf_device *nbpf = platform_get_drvdata(to_platform_device(dev));

+ 1 - 1
drivers/dma/ste_dma40.c

@@ -3051,7 +3051,7 @@ static int dma40_runtime_resume(struct device *dev)
 
 
 static const struct dev_pm_ops dma40_pm_ops = {
 static const struct dev_pm_ops dma40_pm_ops = {
 	SET_LATE_SYSTEM_SLEEP_PM_OPS(dma40_suspend, dma40_resume)
 	SET_LATE_SYSTEM_SLEEP_PM_OPS(dma40_suspend, dma40_resume)
-	SET_PM_RUNTIME_PM_OPS(dma40_runtime_suspend,
+	SET_RUNTIME_PM_OPS(dma40_runtime_suspend,
 				dma40_runtime_resume,
 				dma40_runtime_resume,
 				NULL)
 				NULL)
 };
 };

+ 1 - 1
drivers/dma/tegra20-apb-dma.c

@@ -1587,7 +1587,7 @@ static int tegra_dma_pm_resume(struct device *dev)
 #endif
 #endif
 
 
 static const struct dev_pm_ops tegra_dma_dev_pm_ops = {
 static const struct dev_pm_ops tegra_dma_dev_pm_ops = {
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 	.runtime_suspend = tegra_dma_runtime_suspend,
 	.runtime_suspend = tegra_dma_runtime_suspend,
 	.runtime_resume = tegra_dma_runtime_resume,
 	.runtime_resume = tegra_dma_runtime_resume,
 #endif
 #endif

+ 4 - 4
drivers/gpio/gpio-omap.c

@@ -1259,7 +1259,7 @@ static int omap_gpio_probe(struct platform_device *pdev)
 
 
 #ifdef CONFIG_ARCH_OMAP2PLUS
 #ifdef CONFIG_ARCH_OMAP2PLUS
 
 
-#if defined(CONFIG_PM_RUNTIME)
+#if defined(CONFIG_PM)
 static void omap_gpio_restore_context(struct gpio_bank *bank);
 static void omap_gpio_restore_context(struct gpio_bank *bank);
 
 
 static int omap_gpio_runtime_suspend(struct device *dev)
 static int omap_gpio_runtime_suspend(struct device *dev)
@@ -1440,7 +1440,7 @@ static int omap_gpio_runtime_resume(struct device *dev)
 
 
 	return 0;
 	return 0;
 }
 }
-#endif /* CONFIG_PM_RUNTIME */
+#endif /* CONFIG_PM */
 
 
 void omap2_gpio_prepare_for_idle(int pwr_mode)
 void omap2_gpio_prepare_for_idle(int pwr_mode)
 {
 {
@@ -1468,7 +1468,7 @@ void omap2_gpio_resume_after_idle(void)
 	}
 	}
 }
 }
 
 
-#if defined(CONFIG_PM_RUNTIME)
+#if defined(CONFIG_PM)
 static void omap_gpio_init_context(struct gpio_bank *p)
 static void omap_gpio_init_context(struct gpio_bank *p)
 {
 {
 	struct omap_gpio_reg_offs *regs = p->regs;
 	struct omap_gpio_reg_offs *regs = p->regs;
@@ -1525,7 +1525,7 @@ static void omap_gpio_restore_context(struct gpio_bank *bank)
 	writel_relaxed(bank->context.irqenable2,
 	writel_relaxed(bank->context.irqenable2,
 				bank->base + bank->regs->irqenable2);
 				bank->base + bank->regs->irqenable2);
 }
 }
-#endif /* CONFIG_PM_RUNTIME */
+#endif /* CONFIG_PM */
 #else
 #else
 #define omap_gpio_runtime_suspend NULL
 #define omap_gpio_runtime_suspend NULL
 #define omap_gpio_runtime_resume NULL
 #define omap_gpio_runtime_resume NULL

+ 1 - 1
drivers/gpio/gpio-zynq.c

@@ -578,7 +578,7 @@ static void zynq_gpio_free(struct gpio_chip *chip, unsigned offset)
 
 
 static const struct dev_pm_ops zynq_gpio_dev_pm_ops = {
 static const struct dev_pm_ops zynq_gpio_dev_pm_ops = {
 	SET_SYSTEM_SLEEP_PM_OPS(zynq_gpio_suspend, zynq_gpio_resume)
 	SET_SYSTEM_SLEEP_PM_OPS(zynq_gpio_suspend, zynq_gpio_resume)
-	SET_PM_RUNTIME_PM_OPS(zynq_gpio_runtime_suspend,
+	SET_RUNTIME_PM_OPS(zynq_gpio_runtime_suspend,
 			zynq_gpio_runtime_resume, NULL)
 			zynq_gpio_runtime_resume, NULL)
 };
 };
 
 

+ 1 - 1
drivers/gpu/drm/exynos/exynos_drm_fimc.c

@@ -1817,7 +1817,7 @@ static int fimc_resume(struct device *dev)
 }
 }
 #endif
 #endif
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int fimc_runtime_suspend(struct device *dev)
 static int fimc_runtime_suspend(struct device *dev)
 {
 {
 	struct fimc_context *ctx = get_fimc_context(dev);
 	struct fimc_context *ctx = get_fimc_context(dev);

+ 1 - 1
drivers/gpu/drm/exynos/exynos_drm_g2d.c

@@ -1540,7 +1540,7 @@ static int g2d_resume(struct device *dev)
 }
 }
 #endif
 #endif
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int g2d_runtime_suspend(struct device *dev)
 static int g2d_runtime_suspend(struct device *dev)
 {
 {
 	struct g2d_data *g2d = dev_get_drvdata(dev);
 	struct g2d_data *g2d = dev_get_drvdata(dev);

+ 1 - 1
drivers/gpu/drm/exynos/exynos_drm_gsc.c

@@ -1764,7 +1764,7 @@ static int gsc_resume(struct device *dev)
 }
 }
 #endif
 #endif
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int gsc_runtime_suspend(struct device *dev)
 static int gsc_runtime_suspend(struct device *dev)
 {
 {
 	struct gsc_context *ctx = get_gsc_context(dev);
 	struct gsc_context *ctx = get_gsc_context(dev);

+ 1 - 1
drivers/gpu/drm/exynos/exynos_drm_rotator.c

@@ -822,7 +822,7 @@ static int rotator_resume(struct device *dev)
 }
 }
 #endif
 #endif
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int rotator_runtime_suspend(struct device *dev)
 static int rotator_runtime_suspend(struct device *dev)
 {
 {
 	struct rot_context *rot = dev_get_drvdata(dev);
 	struct rot_context *rot = dev_get_drvdata(dev);

+ 1 - 1
drivers/hid/i2c-hid/i2c-hid.c

@@ -1095,7 +1095,7 @@ static int i2c_hid_resume(struct device *dev)
 }
 }
 #endif
 #endif
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int i2c_hid_runtime_suspend(struct device *dev)
 static int i2c_hid_runtime_suspend(struct device *dev)
 {
 {
 	struct i2c_client *client = to_i2c_client(dev);
 	struct i2c_client *client = to_i2c_client(dev);

+ 1 - 1
drivers/hsi/controllers/omap_ssi.c

@@ -555,7 +555,7 @@ static int __exit ssi_remove(struct platform_device *pd)
 	return 0;
 	return 0;
 }
 }
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int omap_ssi_runtime_suspend(struct device *dev)
 static int omap_ssi_runtime_suspend(struct device *dev)
 {
 {
 	struct hsi_controller *ssi = dev_get_drvdata(dev);
 	struct hsi_controller *ssi = dev_get_drvdata(dev);

+ 1 - 1
drivers/hsi/controllers/omap_ssi_port.c

@@ -1260,7 +1260,7 @@ static int __exit ssi_port_remove(struct platform_device *pd)
 	return 0;
 	return 0;
 }
 }
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int ssi_save_port_ctx(struct omap_ssi_port *omap_port)
 static int ssi_save_port_ctx(struct omap_ssi_port *omap_port)
 {
 {
 	struct hsi_port *port = to_hsi_port(omap_port->dev);
 	struct hsi_port *port = to_hsi_port(omap_port->dev);

+ 1 - 1
drivers/i2c/busses/i2c-hix5hd2.c

@@ -528,7 +528,7 @@ static int hix5hd2_i2c_runtime_resume(struct device *dev)
 #endif
 #endif
 
 
 static const struct dev_pm_ops hix5hd2_i2c_pm_ops = {
 static const struct dev_pm_ops hix5hd2_i2c_pm_ops = {
-	SET_PM_RUNTIME_PM_OPS(hix5hd2_i2c_runtime_suspend,
+	SET_RUNTIME_PM_OPS(hix5hd2_i2c_runtime_suspend,
 			      hix5hd2_i2c_runtime_resume,
 			      hix5hd2_i2c_runtime_resume,
 			      NULL)
 			      NULL)
 };
 };

+ 1 - 1
drivers/i2c/busses/i2c-nomadik.c

@@ -932,7 +932,7 @@ static int nmk_i2c_runtime_resume(struct device *dev)
 
 
 static const struct dev_pm_ops nmk_i2c_pm = {
 static const struct dev_pm_ops nmk_i2c_pm = {
 	SET_LATE_SYSTEM_SLEEP_PM_OPS(nmk_i2c_suspend_late, nmk_i2c_resume_early)
 	SET_LATE_SYSTEM_SLEEP_PM_OPS(nmk_i2c_suspend_late, nmk_i2c_resume_early)
-	SET_PM_RUNTIME_PM_OPS(nmk_i2c_runtime_suspend,
+	SET_RUNTIME_PM_OPS(nmk_i2c_runtime_suspend,
 			nmk_i2c_runtime_resume,
 			nmk_i2c_runtime_resume,
 			NULL)
 			NULL)
 };
 };

+ 0 - 2
drivers/i2c/busses/i2c-omap.c

@@ -1280,7 +1280,6 @@ static int omap_i2c_remove(struct platform_device *pdev)
 }
 }
 
 
 #ifdef CONFIG_PM
 #ifdef CONFIG_PM
-#ifdef CONFIG_PM_RUNTIME
 static int omap_i2c_runtime_suspend(struct device *dev)
 static int omap_i2c_runtime_suspend(struct device *dev)
 {
 {
 	struct platform_device *pdev = to_platform_device(dev);
 	struct platform_device *pdev = to_platform_device(dev);
@@ -1318,7 +1317,6 @@ static int omap_i2c_runtime_resume(struct device *dev)
 
 
 	return 0;
 	return 0;
 }
 }
-#endif /* CONFIG_PM_RUNTIME */
 
 
 static struct dev_pm_ops omap_i2c_pm_ops = {
 static struct dev_pm_ops omap_i2c_pm_ops = {
 	SET_RUNTIME_PM_OPS(omap_i2c_runtime_suspend,
 	SET_RUNTIME_PM_OPS(omap_i2c_runtime_suspend,

+ 2 - 2
drivers/iio/accel/bmc150-accel.c

@@ -513,7 +513,7 @@ static int bmc150_accel_get_bw(struct bmc150_accel_data *data, int *val,
 	return -EINVAL;
 	return -EINVAL;
 }
 }
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int bmc150_accel_get_startup_times(struct bmc150_accel_data *data)
 static int bmc150_accel_get_startup_times(struct bmc150_accel_data *data)
 {
 {
 	int i;
 	int i;
@@ -1371,7 +1371,7 @@ static int bmc150_accel_resume(struct device *dev)
 }
 }
 #endif
 #endif
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int bmc150_accel_runtime_suspend(struct device *dev)
 static int bmc150_accel_runtime_suspend(struct device *dev)
 {
 {
 	struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
 	struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));

+ 2 - 2
drivers/iio/accel/kxcjk-1013.c

@@ -360,7 +360,7 @@ static int kxcjk1013_chip_init(struct kxcjk1013_data *data)
 	return 0;
 	return 0;
 }
 }
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int kxcjk1013_get_startup_times(struct kxcjk1013_data *data)
 static int kxcjk1013_get_startup_times(struct kxcjk1013_data *data)
 {
 {
 	int i;
 	int i;
@@ -1359,7 +1359,7 @@ static int kxcjk1013_resume(struct device *dev)
 }
 }
 #endif
 #endif
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int kxcjk1013_runtime_suspend(struct device *dev)
 static int kxcjk1013_runtime_suspend(struct device *dev)
 {
 {
 	struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
 	struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));

+ 2 - 2
drivers/iio/gyro/bmg160.c

@@ -256,7 +256,7 @@ static int bmg160_chip_init(struct bmg160_data *data)
 
 
 static int bmg160_set_power_state(struct bmg160_data *data, bool on)
 static int bmg160_set_power_state(struct bmg160_data *data, bool on)
 {
 {
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 	int ret;
 	int ret;
 
 
 	if (on)
 	if (on)
@@ -1202,7 +1202,7 @@ static int bmg160_resume(struct device *dev)
 }
 }
 #endif
 #endif
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int bmg160_runtime_suspend(struct device *dev)
 static int bmg160_runtime_suspend(struct device *dev)
 {
 {
 	struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
 	struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));

+ 1 - 1
drivers/input/keyboard/samsung-keypad.c

@@ -463,7 +463,7 @@ static int samsung_keypad_remove(struct platform_device *pdev)
 	return 0;
 	return 0;
 }
 }
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int samsung_keypad_runtime_suspend(struct device *dev)
 static int samsung_keypad_runtime_suspend(struct device *dev)
 {
 {
 	struct platform_device *pdev = to_platform_device(dev);
 	struct platform_device *pdev = to_platform_device(dev);

+ 1 - 1
drivers/input/touchscreen/cyttsp4_core.c

@@ -1716,7 +1716,7 @@ static void cyttsp4_free_si_ptrs(struct cyttsp4 *cd)
 	kfree(si->btn_rec_data);
 	kfree(si->btn_rec_data);
 }
 }
 
 
-#if defined(CONFIG_PM_SLEEP) || defined(CONFIG_PM_RUNTIME)
+#ifdef CONFIG_PM
 static int cyttsp4_core_sleep(struct cyttsp4 *cd)
 static int cyttsp4_core_sleep(struct cyttsp4 *cd)
 {
 {
 	int rc;
 	int rc;

+ 2 - 2
drivers/media/platform/coda/coda-common.c

@@ -1980,7 +1980,7 @@ static int coda_probe(struct platform_device *pdev)
 
 
 	/*
 	/*
 	 * Start activated so we can directly call coda_hw_init in
 	 * Start activated so we can directly call coda_hw_init in
-	 * coda_fw_callback regardless of whether CONFIG_PM_RUNTIME is
+	 * coda_fw_callback regardless of whether CONFIG_PM is
 	 * enabled or whether the device is associated with a PM domain.
 	 * enabled or whether the device is associated with a PM domain.
 	 */
 	 */
 	pm_runtime_get_noresume(&pdev->dev);
 	pm_runtime_get_noresume(&pdev->dev);
@@ -2013,7 +2013,7 @@ static int coda_remove(struct platform_device *pdev)
 	return 0;
 	return 0;
 }
 }
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int coda_runtime_resume(struct device *dev)
 static int coda_runtime_resume(struct device *dev)
 {
 {
 	struct coda_dev *cdev = dev_get_drvdata(dev);
 	struct coda_dev *cdev = dev_get_drvdata(dev);

+ 3 - 3
drivers/media/platform/exynos4-is/fimc-core.c

@@ -832,7 +832,7 @@ err:
 	return -ENXIO;
 	return -ENXIO;
 }
 }
 
 
-#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP)
+#ifdef CONFIG_PM
 static int fimc_m2m_suspend(struct fimc_dev *fimc)
 static int fimc_m2m_suspend(struct fimc_dev *fimc)
 {
 {
 	unsigned long flags;
 	unsigned long flags;
@@ -871,7 +871,7 @@ static int fimc_m2m_resume(struct fimc_dev *fimc)
 
 
 	return 0;
 	return 0;
 }
 }
-#endif /* CONFIG_PM_RUNTIME || CONFIG_PM_SLEEP */
+#endif /* CONFIG_PM */
 
 
 static const struct of_device_id fimc_of_match[];
 static const struct of_device_id fimc_of_match[];
 
 
@@ -1039,7 +1039,7 @@ err_sclk:
 	return ret;
 	return ret;
 }
 }
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int fimc_runtime_resume(struct device *dev)
 static int fimc_runtime_resume(struct device *dev)
 {
 {
 	struct fimc_dev *fimc =	dev_get_drvdata(dev);
 	struct fimc_dev *fimc =	dev_get_drvdata(dev);

+ 1 - 1
drivers/media/platform/exynos4-is/fimc-is-i2c.c

@@ -81,7 +81,7 @@ static int fimc_is_i2c_remove(struct platform_device *pdev)
 	return 0;
 	return 0;
 }
 }
 
 
-#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP)
+#ifdef CONFIG_PM
 static int fimc_is_i2c_runtime_suspend(struct device *dev)
 static int fimc_is_i2c_runtime_suspend(struct device *dev)
 {
 {
 	struct fimc_is_i2c *isp_i2c = dev_get_drvdata(dev);
 	struct fimc_is_i2c *isp_i2c = dev_get_drvdata(dev);

+ 1 - 1
drivers/media/platform/exynos4-is/fimc-lite.c

@@ -1588,7 +1588,7 @@ err_clk_put:
 	return ret;
 	return ret;
 }
 }
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int fimc_lite_runtime_resume(struct device *dev)
 static int fimc_lite_runtime_resume(struct device *dev)
 {
 {
 	struct fimc_lite *fimc = dev_get_drvdata(dev);
 	struct fimc_lite *fimc = dev_get_drvdata(dev);

+ 1 - 1
drivers/media/platform/exynos4-is/mipi-csis.c

@@ -978,7 +978,7 @@ static int s5pcsis_resume(struct device *dev)
 }
 }
 #endif
 #endif
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int s5pcsis_runtime_suspend(struct device *dev)
 static int s5pcsis_runtime_suspend(struct device *dev)
 {
 {
 	return s5pcsis_pm_suspend(dev, true);
 	return s5pcsis_pm_suspend(dev, true);

+ 2 - 2
drivers/media/platform/s5p-jpeg/jpeg-core.c

@@ -2632,7 +2632,7 @@ static int s5p_jpeg_remove(struct platform_device *pdev)
 	return 0;
 	return 0;
 }
 }
 
 
-#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP)
+#ifdef CONFIG_PM
 static int s5p_jpeg_runtime_suspend(struct device *dev)
 static int s5p_jpeg_runtime_suspend(struct device *dev)
 {
 {
 	struct s5p_jpeg *jpeg = dev_get_drvdata(dev);
 	struct s5p_jpeg *jpeg = dev_get_drvdata(dev);
@@ -2682,7 +2682,7 @@ static int s5p_jpeg_runtime_resume(struct device *dev)
 
 
 	return 0;
 	return 0;
 }
 }
-#endif /* CONFIG_PM_RUNTIME || CONFIG_PM_SLEEP */
+#endif /* CONFIG_PM */
 
 
 #ifdef CONFIG_PM_SLEEP
 #ifdef CONFIG_PM_SLEEP
 static int s5p_jpeg_suspend(struct device *dev)
 static int s5p_jpeg_suspend(struct device *dev)

+ 1 - 1
drivers/media/platform/s5p-mfc/s5p_mfc.c

@@ -1302,7 +1302,7 @@ static int s5p_mfc_resume(struct device *dev)
 }
 }
 #endif
 #endif
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int s5p_mfc_runtime_suspend(struct device *dev)
 static int s5p_mfc_runtime_suspend(struct device *dev)
 {
 {
 	struct platform_device *pdev = to_platform_device(dev);
 	struct platform_device *pdev = to_platform_device(dev);

+ 4 - 6
drivers/media/platform/s5p-mfc/s5p_mfc_pm.c

@@ -13,9 +13,7 @@
 #include <linux/clk.h>
 #include <linux/clk.h>
 #include <linux/err.h>
 #include <linux/err.h>
 #include <linux/platform_device.h>
 #include <linux/platform_device.h>
-#ifdef CONFIG_PM_RUNTIME
 #include <linux/pm_runtime.h>
 #include <linux/pm_runtime.h>
-#endif
 #include "s5p_mfc_common.h"
 #include "s5p_mfc_common.h"
 #include "s5p_mfc_debug.h"
 #include "s5p_mfc_debug.h"
 #include "s5p_mfc_pm.h"
 #include "s5p_mfc_pm.h"
@@ -67,7 +65,7 @@ int s5p_mfc_init_pm(struct s5p_mfc_dev *dev)
 	}
 	}
 
 
 	atomic_set(&pm->power, 0);
 	atomic_set(&pm->power, 0);
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 	pm->device = &dev->plat_dev->dev;
 	pm->device = &dev->plat_dev->dev;
 	pm_runtime_enable(pm->device);
 	pm_runtime_enable(pm->device);
 #endif
 #endif
@@ -93,7 +91,7 @@ void s5p_mfc_final_pm(struct s5p_mfc_dev *dev)
 	}
 	}
 	clk_unprepare(pm->clock_gate);
 	clk_unprepare(pm->clock_gate);
 	clk_put(pm->clock_gate);
 	clk_put(pm->clock_gate);
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 	pm_runtime_disable(pm->device);
 	pm_runtime_disable(pm->device);
 #endif
 #endif
 }
 }
@@ -120,7 +118,7 @@ void s5p_mfc_clock_off(void)
 
 
 int s5p_mfc_power_on(void)
 int s5p_mfc_power_on(void)
 {
 {
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 	return pm_runtime_get_sync(pm->device);
 	return pm_runtime_get_sync(pm->device);
 #else
 #else
 	atomic_set(&pm->power, 1);
 	atomic_set(&pm->power, 1);
@@ -130,7 +128,7 @@ int s5p_mfc_power_on(void)
 
 
 int s5p_mfc_power_off(void)
 int s5p_mfc_power_off(void)
 {
 {
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 	return pm_runtime_put_sync(pm->device);
 	return pm_runtime_put_sync(pm->device);
 #else
 #else
 	atomic_set(&pm->power, 0);
 	atomic_set(&pm->power, 0);

+ 1 - 1
drivers/mfd/ab8500-gpadc.c

@@ -867,7 +867,7 @@ static void ab8500_gpadc_read_calibration_data(struct ab8500_gpadc *gpadc)
 		gpadc->cal_data[ADC_INPUT_VBAT].offset);
 		gpadc->cal_data[ADC_INPUT_VBAT].offset);
 }
 }
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int ab8500_gpadc_runtime_suspend(struct device *dev)
 static int ab8500_gpadc_runtime_suspend(struct device *dev)
 {
 {
 	struct ab8500_gpadc *gpadc = dev_get_drvdata(dev);
 	struct ab8500_gpadc *gpadc = dev_get_drvdata(dev);

+ 2 - 2
drivers/mfd/arizona-core.c

@@ -330,7 +330,7 @@ err_fll:
 		return err;
 		return err;
 }
 }
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int arizona_runtime_resume(struct device *dev)
 static int arizona_runtime_resume(struct device *dev)
 {
 {
 	struct arizona *arizona = dev_get_drvdata(dev);
 	struct arizona *arizona = dev_get_drvdata(dev);
@@ -1024,7 +1024,7 @@ int arizona_dev_init(struct arizona *arizona)
 		goto err_irq;
 		goto err_irq;
 	}
 	}
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 	regulator_disable(arizona->dcvdd);
 	regulator_disable(arizona->dcvdd);
 #endif
 #endif
 
 

+ 1 - 1
drivers/mfd/wm8994-core.c

@@ -116,7 +116,7 @@ static const char *wm8958_main_supplies[] = {
 	"SPKVDD2",
 	"SPKVDD2",
 };
 };
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int wm8994_suspend(struct device *dev)
 static int wm8994_suspend(struct device *dev)
 {
 {
 	struct wm8994 *wm8994 = dev_get_drvdata(dev);
 	struct wm8994 *wm8994 = dev_get_drvdata(dev);

+ 2 - 2
drivers/misc/apds990x.c

@@ -609,7 +609,7 @@ static int apds990x_detect(struct apds990x_chip *chip)
 	return ret;
 	return ret;
 }
 }
 
 
-#if defined(CONFIG_PM) || defined(CONFIG_PM_RUNTIME)
+#ifdef CONFIG_PM
 static int apds990x_chip_on(struct apds990x_chip *chip)
 static int apds990x_chip_on(struct apds990x_chip *chip)
 {
 {
 	int err	 = regulator_bulk_enable(ARRAY_SIZE(chip->regs),
 	int err	 = regulator_bulk_enable(ARRAY_SIZE(chip->regs),
@@ -1237,7 +1237,7 @@ static int apds990x_resume(struct device *dev)
 }
 }
 #endif
 #endif
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int apds990x_runtime_suspend(struct device *dev)
 static int apds990x_runtime_suspend(struct device *dev)
 {
 {
 	struct i2c_client *client = container_of(dev, struct i2c_client, dev);
 	struct i2c_client *client = container_of(dev, struct i2c_client, dev);

+ 1 - 1
drivers/misc/bh1770glc.c

@@ -1358,7 +1358,7 @@ static int bh1770_resume(struct device *dev)
 }
 }
 #endif
 #endif
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int bh1770_runtime_suspend(struct device *dev)
 static int bh1770_runtime_suspend(struct device *dev)
 {
 {
 	struct i2c_client *client = container_of(dev, struct i2c_client, dev);
 	struct i2c_client *client = container_of(dev, struct i2c_client, dev);

+ 2 - 2
drivers/misc/lis3lv02d/lis3lv02d_i2c.c

@@ -235,7 +235,7 @@ static int lis3lv02d_i2c_resume(struct device *dev)
 }
 }
 #endif /* CONFIG_PM_SLEEP */
 #endif /* CONFIG_PM_SLEEP */
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int lis3_i2c_runtime_suspend(struct device *dev)
 static int lis3_i2c_runtime_suspend(struct device *dev)
 {
 {
 	struct i2c_client *client = container_of(dev, struct i2c_client, dev);
 	struct i2c_client *client = container_of(dev, struct i2c_client, dev);
@@ -253,7 +253,7 @@ static int lis3_i2c_runtime_resume(struct device *dev)
 	lis3lv02d_poweron(lis3);
 	lis3lv02d_poweron(lis3);
 	return 0;
 	return 0;
 }
 }
-#endif /* CONFIG_PM_RUNTIME */
+#endif /* CONFIG_PM */
 
 
 static const struct i2c_device_id lis3lv02d_id[] = {
 static const struct i2c_device_id lis3lv02d_id[] = {
 	{"lis3lv02d", LIS3LV02D},
 	{"lis3lv02d", LIS3LV02D},

+ 2 - 2
drivers/misc/mei/mei_dev.h

@@ -530,9 +530,9 @@ struct mei_device {
 	 * Power Gating support
 	 * Power Gating support
 	 */
 	 */
 	enum mei_pg_event pg_event;
 	enum mei_pg_event pg_event;
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 	struct dev_pm_domain pg_domain;
 	struct dev_pm_domain pg_domain;
-#endif /* CONFIG_PM_RUNTIME */
+#endif /* CONFIG_PM */
 
 
 	unsigned char rd_msg_buf[MEI_RD_MSG_BUF_SIZE];
 	unsigned char rd_msg_buf[MEI_RD_MSG_BUF_SIZE];
 	u32 rd_msg_hdr;
 	u32 rd_msg_hdr;

+ 3 - 5
drivers/misc/mei/pci-me.c

@@ -89,13 +89,13 @@ static const struct pci_device_id mei_me_pci_tbl[] = {
 
 
 MODULE_DEVICE_TABLE(pci, mei_me_pci_tbl);
 MODULE_DEVICE_TABLE(pci, mei_me_pci_tbl);
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static inline void mei_me_set_pm_domain(struct mei_device *dev);
 static inline void mei_me_set_pm_domain(struct mei_device *dev);
 static inline void mei_me_unset_pm_domain(struct mei_device *dev);
 static inline void mei_me_unset_pm_domain(struct mei_device *dev);
 #else
 #else
 static inline void mei_me_set_pm_domain(struct mei_device *dev) {}
 static inline void mei_me_set_pm_domain(struct mei_device *dev) {}
 static inline void mei_me_unset_pm_domain(struct mei_device *dev) {}
 static inline void mei_me_unset_pm_domain(struct mei_device *dev) {}
-#endif /* CONFIG_PM_RUNTIME */
+#endif /* CONFIG_PM */
 
 
 /**
 /**
  * mei_me_quirk_probe - probe for devices that doesn't valid ME interface
  * mei_me_quirk_probe - probe for devices that doesn't valid ME interface
@@ -357,7 +357,7 @@ static int mei_me_pci_resume(struct device *device)
 }
 }
 #endif /* CONFIG_PM_SLEEP */
 #endif /* CONFIG_PM_SLEEP */
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int mei_me_pm_runtime_idle(struct device *device)
 static int mei_me_pm_runtime_idle(struct device *device)
 {
 {
 	struct pci_dev *pdev = to_pci_dev(device);
 	struct pci_dev *pdev = to_pci_dev(device);
@@ -453,9 +453,7 @@ static inline void mei_me_unset_pm_domain(struct mei_device *dev)
 	/* stop using pm callbacks if any */
 	/* stop using pm callbacks if any */
 	dev->dev->pm_domain = NULL;
 	dev->dev->pm_domain = NULL;
 }
 }
-#endif /* CONFIG_PM_RUNTIME */
 
 
-#ifdef CONFIG_PM
 static const struct dev_pm_ops mei_me_pm_ops = {
 static const struct dev_pm_ops mei_me_pm_ops = {
 	SET_SYSTEM_SLEEP_PM_OPS(mei_me_pci_suspend,
 	SET_SYSTEM_SLEEP_PM_OPS(mei_me_pci_suspend,
 				mei_me_pci_resume)
 				mei_me_pci_resume)

+ 3 - 5
drivers/misc/mei/pci-txe.c

@@ -42,13 +42,13 @@ static const struct pci_device_id mei_txe_pci_tbl[] = {
 };
 };
 MODULE_DEVICE_TABLE(pci, mei_txe_pci_tbl);
 MODULE_DEVICE_TABLE(pci, mei_txe_pci_tbl);
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static inline void mei_txe_set_pm_domain(struct mei_device *dev);
 static inline void mei_txe_set_pm_domain(struct mei_device *dev);
 static inline void mei_txe_unset_pm_domain(struct mei_device *dev);
 static inline void mei_txe_unset_pm_domain(struct mei_device *dev);
 #else
 #else
 static inline void mei_txe_set_pm_domain(struct mei_device *dev) {}
 static inline void mei_txe_set_pm_domain(struct mei_device *dev) {}
 static inline void mei_txe_unset_pm_domain(struct mei_device *dev) {}
 static inline void mei_txe_unset_pm_domain(struct mei_device *dev) {}
-#endif /* CONFIG_PM_RUNTIME */
+#endif /* CONFIG_PM */
 
 
 static void mei_txe_pci_iounmap(struct pci_dev *pdev, struct mei_txe_hw *hw)
 static void mei_txe_pci_iounmap(struct pci_dev *pdev, struct mei_txe_hw *hw)
 {
 {
@@ -295,7 +295,7 @@ static int mei_txe_pci_resume(struct device *device)
 }
 }
 #endif /* CONFIG_PM_SLEEP */
 #endif /* CONFIG_PM_SLEEP */
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int mei_txe_pm_runtime_idle(struct device *device)
 static int mei_txe_pm_runtime_idle(struct device *device)
 {
 {
 	struct pci_dev *pdev = to_pci_dev(device);
 	struct pci_dev *pdev = to_pci_dev(device);
@@ -401,9 +401,7 @@ static inline void mei_txe_unset_pm_domain(struct mei_device *dev)
 	/* stop using pm callbacks if any */
 	/* stop using pm callbacks if any */
 	dev->dev->pm_domain = NULL;
 	dev->dev->pm_domain = NULL;
 }
 }
-#endif /* CONFIG_PM_RUNTIME */
 
 
-#ifdef CONFIG_PM
 static const struct dev_pm_ops mei_txe_pm_ops = {
 static const struct dev_pm_ops mei_txe_pm_ops = {
 	SET_SYSTEM_SLEEP_PM_OPS(mei_txe_pci_suspend,
 	SET_SYSTEM_SLEEP_PM_OPS(mei_txe_pci_suspend,
 				mei_txe_pci_resume)
 				mei_txe_pci_resume)

+ 2 - 2
drivers/mmc/core/bus.c

@@ -179,7 +179,7 @@ static int mmc_bus_resume(struct device *dev)
 }
 }
 #endif
 #endif
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int mmc_runtime_suspend(struct device *dev)
 static int mmc_runtime_suspend(struct device *dev)
 {
 {
 	struct mmc_card *card = mmc_dev_to_card(dev);
 	struct mmc_card *card = mmc_dev_to_card(dev);
@@ -195,7 +195,7 @@ static int mmc_runtime_resume(struct device *dev)
 
 
 	return host->bus_ops->runtime_resume(host);
 	return host->bus_ops->runtime_resume(host);
 }
 }
-#endif /* !CONFIG_PM_RUNTIME */
+#endif /* !CONFIG_PM */
 
 
 static const struct dev_pm_ops mmc_bus_pm_ops = {
 static const struct dev_pm_ops mmc_bus_pm_ops = {
 	SET_RUNTIME_PM_OPS(mmc_runtime_suspend, mmc_runtime_resume, NULL)
 	SET_RUNTIME_PM_OPS(mmc_runtime_suspend, mmc_runtime_resume, NULL)

+ 1 - 1
drivers/mmc/host/mmci.c

@@ -1843,7 +1843,7 @@ static int mmci_runtime_resume(struct device *dev)
 static const struct dev_pm_ops mmci_dev_pm_ops = {
 static const struct dev_pm_ops mmci_dev_pm_ops = {
 	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
 	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
 				pm_runtime_force_resume)
 				pm_runtime_force_resume)
-	SET_PM_RUNTIME_PM_OPS(mmci_runtime_suspend, mmci_runtime_resume, NULL)
+	SET_RUNTIME_PM_OPS(mmci_runtime_suspend, mmci_runtime_resume, NULL)
 };
 };
 
 
 static struct amba_id mmci_ids[] = {
 static struct amba_id mmci_ids[] = {

+ 1 - 1
drivers/mmc/host/sdhci-acpi.c

@@ -416,7 +416,7 @@ static int sdhci_acpi_resume(struct device *dev)
 
 
 #endif
 #endif
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 
 
 static int sdhci_acpi_runtime_suspend(struct device *dev)
 static int sdhci_acpi_runtime_suspend(struct device *dev)
 {
 {

+ 2 - 2
drivers/mmc/host/sdhci-esdhc-imx.c

@@ -1172,7 +1172,7 @@ static int sdhci_esdhc_imx_remove(struct platform_device *pdev)
 	pm_runtime_dont_use_autosuspend(&pdev->dev);
 	pm_runtime_dont_use_autosuspend(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
 
 
-	if (!IS_ENABLED(CONFIG_PM_RUNTIME)) {
+	if (!IS_ENABLED(CONFIG_PM)) {
 		clk_disable_unprepare(imx_data->clk_per);
 		clk_disable_unprepare(imx_data->clk_per);
 		clk_disable_unprepare(imx_data->clk_ipg);
 		clk_disable_unprepare(imx_data->clk_ipg);
 		clk_disable_unprepare(imx_data->clk_ahb);
 		clk_disable_unprepare(imx_data->clk_ahb);
@@ -1183,7 +1183,7 @@ static int sdhci_esdhc_imx_remove(struct platform_device *pdev)
 	return 0;
 	return 0;
 }
 }
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int sdhci_esdhc_runtime_suspend(struct device *dev)
 static int sdhci_esdhc_runtime_suspend(struct device *dev)
 {
 {
 	struct sdhci_host *host = dev_get_drvdata(dev);
 	struct sdhci_host *host = dev_get_drvdata(dev);

+ 7 - 11
drivers/mmc/host/sdhci-pci.c

@@ -134,7 +134,7 @@ static int pch_hc_probe_slot(struct sdhci_pci_slot *slot)
 	return 0;
 	return 0;
 }
 }
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 
 
 static irqreturn_t sdhci_pci_sd_cd(int irq, void *dev_id)
 static irqreturn_t sdhci_pci_sd_cd(int irq, void *dev_id)
 {
 {
@@ -1230,15 +1230,6 @@ static int sdhci_pci_resume(struct device *dev)
 	return 0;
 	return 0;
 }
 }
 
 
-#else /* CONFIG_PM */
-
-#define sdhci_pci_suspend NULL
-#define sdhci_pci_resume NULL
-
-#endif /* CONFIG_PM */
-
-#ifdef CONFIG_PM_RUNTIME
-
 static int sdhci_pci_runtime_suspend(struct device *dev)
 static int sdhci_pci_runtime_suspend(struct device *dev)
 {
 {
 	struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
 	struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
@@ -1310,7 +1301,12 @@ static int sdhci_pci_runtime_idle(struct device *dev)
 	return 0;
 	return 0;
 }
 }
 
 
-#endif
+#else /* CONFIG_PM */
+
+#define sdhci_pci_suspend NULL
+#define sdhci_pci_resume NULL
+
+#endif /* CONFIG_PM */
 
 
 static const struct dev_pm_ops sdhci_pci_pm_ops = {
 static const struct dev_pm_ops sdhci_pci_pm_ops = {
 	.suspend = sdhci_pci_suspend,
 	.suspend = sdhci_pci_suspend,

+ 1 - 1
drivers/mmc/host/sdhci-pxav3.c

@@ -436,7 +436,7 @@ static int sdhci_pxav3_resume(struct device *dev)
 }
 }
 #endif
 #endif
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int sdhci_pxav3_runtime_suspend(struct device *dev)
 static int sdhci_pxav3_runtime_suspend(struct device *dev)
 {
 {
 	struct sdhci_host *host = dev_get_drvdata(dev);
 	struct sdhci_host *host = dev_get_drvdata(dev);

+ 3 - 3
drivers/mmc/host/sdhci-s3c.c

@@ -609,7 +609,7 @@ static int sdhci_s3c_probe(struct platform_device *pdev)
 		goto err_req_regs;
 		goto err_req_regs;
 	}
 	}
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 	if (pdata->cd_type != S3C_SDHCI_CD_INTERNAL)
 	if (pdata->cd_type != S3C_SDHCI_CD_INTERNAL)
 		clk_disable_unprepare(sc->clk_io);
 		clk_disable_unprepare(sc->clk_io);
 #endif
 #endif
@@ -635,7 +635,7 @@ static int sdhci_s3c_remove(struct platform_device *pdev)
 	if (sc->ext_cd_irq)
 	if (sc->ext_cd_irq)
 		free_irq(sc->ext_cd_irq, sc);
 		free_irq(sc->ext_cd_irq, sc);
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 	if (sc->pdata->cd_type != S3C_SDHCI_CD_INTERNAL)
 	if (sc->pdata->cd_type != S3C_SDHCI_CD_INTERNAL)
 		clk_prepare_enable(sc->clk_io);
 		clk_prepare_enable(sc->clk_io);
 #endif
 #endif
@@ -667,7 +667,7 @@ static int sdhci_s3c_resume(struct device *dev)
 }
 }
 #endif
 #endif
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int sdhci_s3c_runtime_suspend(struct device *dev)
 static int sdhci_s3c_runtime_suspend(struct device *dev)
 {
 {
 	struct sdhci_host *host = dev_get_drvdata(dev);
 	struct sdhci_host *host = dev_get_drvdata(dev);

+ 2 - 5
drivers/mmc/host/sdhci.c

@@ -56,7 +56,7 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode);
 static void sdhci_tuning_timer(unsigned long data);
 static void sdhci_tuning_timer(unsigned long data);
 static void sdhci_enable_preset_value(struct sdhci_host *host, bool enable);
 static void sdhci_enable_preset_value(struct sdhci_host *host, bool enable);
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int sdhci_runtime_pm_get(struct sdhci_host *host);
 static int sdhci_runtime_pm_get(struct sdhci_host *host);
 static int sdhci_runtime_pm_put(struct sdhci_host *host);
 static int sdhci_runtime_pm_put(struct sdhci_host *host);
 static void sdhci_runtime_pm_bus_on(struct sdhci_host *host);
 static void sdhci_runtime_pm_bus_on(struct sdhci_host *host);
@@ -2654,9 +2654,6 @@ int sdhci_resume_host(struct sdhci_host *host)
 }
 }
 
 
 EXPORT_SYMBOL_GPL(sdhci_resume_host);
 EXPORT_SYMBOL_GPL(sdhci_resume_host);
-#endif /* CONFIG_PM */
-
-#ifdef CONFIG_PM_RUNTIME
 
 
 static int sdhci_runtime_pm_get(struct sdhci_host *host)
 static int sdhci_runtime_pm_get(struct sdhci_host *host)
 {
 {
@@ -2757,7 +2754,7 @@ int sdhci_runtime_resume_host(struct sdhci_host *host)
 }
 }
 EXPORT_SYMBOL_GPL(sdhci_runtime_resume_host);
 EXPORT_SYMBOL_GPL(sdhci_runtime_resume_host);
 
 
-#endif
+#endif /* CONFIG_PM */
 
 
 /*****************************************************************************\
 /*****************************************************************************\
  *                                                                           *
  *                                                                           *

+ 0 - 3
drivers/mmc/host/sdhci.h

@@ -411,9 +411,6 @@ void sdhci_set_uhs_signaling(struct sdhci_host *host, unsigned timing);
 extern int sdhci_suspend_host(struct sdhci_host *host);
 extern int sdhci_suspend_host(struct sdhci_host *host);
 extern int sdhci_resume_host(struct sdhci_host *host);
 extern int sdhci_resume_host(struct sdhci_host *host);
 extern void sdhci_enable_irq_wakeups(struct sdhci_host *host);
 extern void sdhci_enable_irq_wakeups(struct sdhci_host *host);
-#endif
-
-#ifdef CONFIG_PM_RUNTIME
 extern int sdhci_runtime_suspend_host(struct sdhci_host *host);
 extern int sdhci_runtime_suspend_host(struct sdhci_host *host);
 extern int sdhci_runtime_resume_host(struct sdhci_host *host);
 extern int sdhci_runtime_resume_host(struct sdhci_host *host);
 #endif
 #endif

+ 1 - 1
drivers/mmc/host/sh_mobile_sdhi.c

@@ -375,7 +375,7 @@ static int sh_mobile_sdhi_remove(struct platform_device *pdev)
 static const struct dev_pm_ops tmio_mmc_dev_pm_ops = {
 static const struct dev_pm_ops tmio_mmc_dev_pm_ops = {
 	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
 	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
 			pm_runtime_force_resume)
 			pm_runtime_force_resume)
-	SET_PM_RUNTIME_PM_OPS(tmio_mmc_host_runtime_suspend,
+	SET_RUNTIME_PM_OPS(tmio_mmc_host_runtime_suspend,
 			tmio_mmc_host_runtime_resume,
 			tmio_mmc_host_runtime_resume,
 			NULL)
 			NULL)
 };
 };

+ 1 - 1
drivers/mmc/host/tmio_mmc.c

@@ -135,7 +135,7 @@ static int tmio_mmc_remove(struct platform_device *pdev)
 
 
 static const struct dev_pm_ops tmio_mmc_dev_pm_ops = {
 static const struct dev_pm_ops tmio_mmc_dev_pm_ops = {
 	SET_SYSTEM_SLEEP_PM_OPS(tmio_mmc_suspend, tmio_mmc_resume)
 	SET_SYSTEM_SLEEP_PM_OPS(tmio_mmc_suspend, tmio_mmc_resume)
-	SET_PM_RUNTIME_PM_OPS(tmio_mmc_host_runtime_suspend,
+	SET_RUNTIME_PM_OPS(tmio_mmc_host_runtime_suspend,
 			tmio_mmc_host_runtime_resume,
 			tmio_mmc_host_runtime_resume,
 			NULL)
 			NULL)
 };
 };

+ 0 - 2
drivers/net/ethernet/intel/e1000e/netdev.c

@@ -6372,7 +6372,6 @@ static int e1000e_pm_resume(struct device *dev)
 }
 }
 #endif /* CONFIG_PM_SLEEP */
 #endif /* CONFIG_PM_SLEEP */
 
 
-#ifdef CONFIG_PM_RUNTIME
 static int e1000e_pm_runtime_idle(struct device *dev)
 static int e1000e_pm_runtime_idle(struct device *dev)
 {
 {
 	struct pci_dev *pdev = to_pci_dev(dev);
 	struct pci_dev *pdev = to_pci_dev(dev);
@@ -6432,7 +6431,6 @@ static int e1000e_pm_runtime_suspend(struct device *dev)
 
 
 	return 0;
 	return 0;
 }
 }
-#endif /* CONFIG_PM_RUNTIME */
 #endif /* CONFIG_PM */
 #endif /* CONFIG_PM */
 
 
 static void e1000_shutdown(struct pci_dev *pdev)
 static void e1000_shutdown(struct pci_dev *pdev)

+ 1 - 5
drivers/net/ethernet/intel/igb/igb_main.c

@@ -186,11 +186,9 @@ static int igb_pci_enable_sriov(struct pci_dev *dev, int num_vfs);
 static int igb_suspend(struct device *);
 static int igb_suspend(struct device *);
 #endif
 #endif
 static int igb_resume(struct device *);
 static int igb_resume(struct device *);
-#ifdef CONFIG_PM_RUNTIME
 static int igb_runtime_suspend(struct device *dev);
 static int igb_runtime_suspend(struct device *dev);
 static int igb_runtime_resume(struct device *dev);
 static int igb_runtime_resume(struct device *dev);
 static int igb_runtime_idle(struct device *dev);
 static int igb_runtime_idle(struct device *dev);
-#endif
 static const struct dev_pm_ops igb_pm_ops = {
 static const struct dev_pm_ops igb_pm_ops = {
 	SET_SYSTEM_SLEEP_PM_OPS(igb_suspend, igb_resume)
 	SET_SYSTEM_SLEEP_PM_OPS(igb_suspend, igb_resume)
 	SET_RUNTIME_PM_OPS(igb_runtime_suspend, igb_runtime_resume,
 	SET_RUNTIME_PM_OPS(igb_runtime_suspend, igb_runtime_resume,
@@ -7450,7 +7448,6 @@ static int igb_resume(struct device *dev)
 	return 0;
 	return 0;
 }
 }
 
 
-#ifdef CONFIG_PM_RUNTIME
 static int igb_runtime_idle(struct device *dev)
 static int igb_runtime_idle(struct device *dev)
 {
 {
 	struct pci_dev *pdev = to_pci_dev(dev);
 	struct pci_dev *pdev = to_pci_dev(dev);
@@ -7487,8 +7484,7 @@ static int igb_runtime_resume(struct device *dev)
 {
 {
 	return igb_resume(dev);
 	return igb_resume(dev);
 }
 }
-#endif /* CONFIG_PM_RUNTIME */
-#endif
+#endif /* CONFIG_PM */
 
 
 static void igb_shutdown(struct pci_dev *pdev)
 static void igb_shutdown(struct pci_dev *pdev)
 {
 {

+ 7 - 13
drivers/pci/pci-driver.c

@@ -1104,7 +1104,7 @@ static int pci_pm_restore(struct device *dev)
 
 
 #endif /* !CONFIG_HIBERNATE_CALLBACKS */
 #endif /* !CONFIG_HIBERNATE_CALLBACKS */
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 
 
 static int pci_pm_runtime_suspend(struct device *dev)
 static int pci_pm_runtime_suspend(struct device *dev)
 {
 {
@@ -1200,16 +1200,6 @@ static int pci_pm_runtime_idle(struct device *dev)
 	return ret;
 	return ret;
 }
 }
 
 
-#else /* !CONFIG_PM_RUNTIME */
-
-#define pci_pm_runtime_suspend	NULL
-#define pci_pm_runtime_resume	NULL
-#define pci_pm_runtime_idle	NULL
-
-#endif /* !CONFIG_PM_RUNTIME */
-
-#ifdef CONFIG_PM
-
 static const struct dev_pm_ops pci_dev_pm_ops = {
 static const struct dev_pm_ops pci_dev_pm_ops = {
 	.prepare = pci_pm_prepare,
 	.prepare = pci_pm_prepare,
 	.suspend = pci_pm_suspend,
 	.suspend = pci_pm_suspend,
@@ -1231,11 +1221,15 @@ static const struct dev_pm_ops pci_dev_pm_ops = {
 
 
 #define PCI_PM_OPS_PTR	(&pci_dev_pm_ops)
 #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_idle	NULL
 
 
 #define PCI_PM_OPS_PTR	NULL
 #define PCI_PM_OPS_PTR	NULL
 
 
-#endif /* !COMFIG_PM_OPS */
+#endif /* !CONFIG_PM */
 
 
 /**
 /**
  * __pci_register_driver - register a new pci driver
  * __pci_register_driver - register a new pci driver

+ 2 - 2
drivers/pci/pci-sysfs.c

@@ -385,7 +385,7 @@ static ssize_t dev_bus_rescan_store(struct device *dev,
 }
 }
 static DEVICE_ATTR(rescan, (S_IWUSR|S_IWGRP), NULL, dev_bus_rescan_store);
 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,
 static ssize_t d3cold_allowed_store(struct device *dev,
 				    struct device_attribute *attr,
 				    struct device_attribute *attr,
 				    const char *buf, size_t count)
 				    const char *buf, size_t count)
@@ -566,7 +566,7 @@ static struct attribute *pci_dev_attrs[] = {
 	&dev_attr_enable.attr,
 	&dev_attr_enable.attr,
 	&dev_attr_broken_parity_status.attr,
 	&dev_attr_broken_parity_status.attr,
 	&dev_attr_msi_bus.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,
 	&dev_attr_d3cold_allowed.attr,
 #endif
 #endif
 #ifdef CONFIG_OF
 #ifdef CONFIG_OF

+ 1 - 1
drivers/pci/pcie/Kconfig

@@ -79,4 +79,4 @@ endchoice
 
 
 config PCIE_PME
 config PCIE_PME
 	def_bool y
 	def_bool y
-	depends on PCIEPORTBUS && PM_RUNTIME
+	depends on PCIEPORTBUS && PM

+ 2 - 2
drivers/sh/pm_runtime.c

@@ -20,7 +20,7 @@
 #include <linux/bitmap.h>
 #include <linux/bitmap.h>
 #include <linux/slab.h>
 #include <linux/slab.h>
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int sh_pm_runtime_suspend(struct device *dev)
 static int sh_pm_runtime_suspend(struct device *dev)
 {
 {
 	int ret;
 	int ret;
@@ -68,7 +68,7 @@ static struct dev_pm_domain default_pm_domain = {
 
 
 #define DEFAULT_PM_DOMAIN_PTR	NULL
 #define DEFAULT_PM_DOMAIN_PTR	NULL
 
 
-#endif /* CONFIG_PM_RUNTIME */
+#endif /* CONFIG_PM */
 
 
 static struct pm_clk_notifier_block platform_bus_notifier = {
 static struct pm_clk_notifier_block platform_bus_notifier = {
 	.pm_domain = DEFAULT_PM_DOMAIN_PTR,
 	.pm_domain = DEFAULT_PM_DOMAIN_PTR,

+ 1 - 1
drivers/spi/spi-pl022.c

@@ -2377,7 +2377,7 @@ static int pl022_runtime_resume(struct device *dev)
 
 
 static const struct dev_pm_ops pl022_dev_pm_ops = {
 static const struct dev_pm_ops pl022_dev_pm_ops = {
 	SET_SYSTEM_SLEEP_PM_OPS(pl022_suspend, pl022_resume)
 	SET_SYSTEM_SLEEP_PM_OPS(pl022_suspend, pl022_resume)
-	SET_PM_RUNTIME_PM_OPS(pl022_runtime_suspend, pl022_runtime_resume, NULL)
+	SET_RUNTIME_PM_OPS(pl022_runtime_suspend, pl022_runtime_resume, NULL)
 };
 };
 
 
 static struct vendor_data vendor_arm = {
 static struct vendor_data vendor_arm = {

+ 1 - 5
drivers/usb/core/driver.c

@@ -1493,10 +1493,6 @@ int usb_resume(struct device *dev, pm_message_t msg)
 	return status;
 	return status;
 }
 }
 
 
-#endif /* CONFIG_PM */
-
-#ifdef CONFIG_PM_RUNTIME
-
 /**
 /**
  * usb_enable_autosuspend - allow a USB device to be autosuspended
  * usb_enable_autosuspend - allow a USB device to be autosuspended
  * @udev: the USB device which may be autosuspended
  * @udev: the USB device which may be autosuspended
@@ -1876,7 +1872,7 @@ int usb_set_usb2_hardware_lpm(struct usb_device *udev, int enable)
 	return ret;
 	return ret;
 }
 }
 
 
-#endif /* CONFIG_PM_RUNTIME */
+#endif /* CONFIG_PM */
 
 
 struct bus_type usb_bus_type = {
 struct bus_type usb_bus_type = {
 	.name =		"usb",
 	.name =		"usb",

+ 0 - 11
drivers/usb/core/hcd-pci.c

@@ -429,7 +429,6 @@ static int check_root_hub_suspended(struct device *dev)
 	return 0;
 	return 0;
 }
 }
 
 
-#if defined(CONFIG_PM_SLEEP) || defined(CONFIG_PM_RUNTIME)
 static int suspend_common(struct device *dev, bool do_wakeup)
 static int suspend_common(struct device *dev, bool do_wakeup)
 {
 {
 	struct pci_dev		*pci_dev = to_pci_dev(dev);
 	struct pci_dev		*pci_dev = to_pci_dev(dev);
@@ -528,7 +527,6 @@ static int resume_common(struct device *dev, int event)
 	}
 	}
 	return retval;
 	return retval;
 }
 }
-#endif	/* SLEEP || RUNTIME */
 
 
 #ifdef	CONFIG_PM_SLEEP
 #ifdef	CONFIG_PM_SLEEP
 
 
@@ -607,8 +605,6 @@ static int hcd_pci_restore(struct device *dev)
 
 
 #endif	/* CONFIG_PM_SLEEP */
 #endif	/* CONFIG_PM_SLEEP */
 
 
-#ifdef	CONFIG_PM_RUNTIME
-
 static int hcd_pci_runtime_suspend(struct device *dev)
 static int hcd_pci_runtime_suspend(struct device *dev)
 {
 {
 	int	retval;
 	int	retval;
@@ -630,13 +626,6 @@ static int hcd_pci_runtime_resume(struct device *dev)
 	return retval;
 	return retval;
 }
 }
 
 
-#else
-
-#define hcd_pci_runtime_suspend	NULL
-#define hcd_pci_runtime_resume	NULL
-
-#endif	/* CONFIG_PM_RUNTIME */
-
 const struct dev_pm_ops usb_hcd_pci_pm_ops = {
 const struct dev_pm_ops usb_hcd_pci_pm_ops = {
 	.suspend	= hcd_pci_suspend,
 	.suspend	= hcd_pci_suspend,
 	.suspend_noirq	= hcd_pci_suspend_noirq,
 	.suspend_noirq	= hcd_pci_suspend_noirq,

+ 4 - 8
drivers/usb/core/hcd.c

@@ -2258,10 +2258,6 @@ int hcd_bus_resume(struct usb_device *rhdev, pm_message_t msg)
 	return status;
 	return status;
 }
 }
 
 
-#endif	/* CONFIG_PM */
-
-#ifdef	CONFIG_PM_RUNTIME
-
 /* Workqueue routine for root-hub remote wakeup */
 /* Workqueue routine for root-hub remote wakeup */
 static void hcd_resume_work(struct work_struct *work)
 static void hcd_resume_work(struct work_struct *work)
 {
 {
@@ -2293,7 +2289,7 @@ void usb_hcd_resume_root_hub (struct usb_hcd *hcd)
 }
 }
 EXPORT_SYMBOL_GPL(usb_hcd_resume_root_hub);
 EXPORT_SYMBOL_GPL(usb_hcd_resume_root_hub);
 
 
-#endif	/* CONFIG_PM_RUNTIME */
+#endif	/* CONFIG_PM */
 
 
 /*-------------------------------------------------------------------------*/
 /*-------------------------------------------------------------------------*/
 
 
@@ -2476,7 +2472,7 @@ struct usb_hcd *usb_create_shared_hcd(const struct hc_driver *driver,
 	init_timer(&hcd->rh_timer);
 	init_timer(&hcd->rh_timer);
 	hcd->rh_timer.function = rh_timer_func;
 	hcd->rh_timer.function = rh_timer_func;
 	hcd->rh_timer.data = (unsigned long) hcd;
 	hcd->rh_timer.data = (unsigned long) hcd;
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 	INIT_WORK(&hcd->wakeup_work, hcd_resume_work);
 	INIT_WORK(&hcd->wakeup_work, hcd_resume_work);
 #endif
 #endif
 
 
@@ -2790,7 +2786,7 @@ error_create_attr_group:
 	hcd->rh_registered = 0;
 	hcd->rh_registered = 0;
 	spin_unlock_irq(&hcd_root_hub_lock);
 	spin_unlock_irq(&hcd_root_hub_lock);
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 	cancel_work_sync(&hcd->wakeup_work);
 	cancel_work_sync(&hcd->wakeup_work);
 #endif
 #endif
 	mutex_lock(&usb_bus_list_lock);
 	mutex_lock(&usb_bus_list_lock);
@@ -2858,7 +2854,7 @@ void usb_remove_hcd(struct usb_hcd *hcd)
 	hcd->rh_registered = 0;
 	hcd->rh_registered = 0;
 	spin_unlock_irq (&hcd_root_hub_lock);
 	spin_unlock_irq (&hcd_root_hub_lock);
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 	cancel_work_sync(&hcd->wakeup_work);
 	cancel_work_sync(&hcd->wakeup_work);
 #endif
 #endif
 
 

+ 3 - 3
drivers/usb/core/hub.c

@@ -1737,7 +1737,7 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id)
 	 * - If user has indicated to prevent autosuspend by passing
 	 * - If user has indicated to prevent autosuspend by passing
 	 *   usbcore.autosuspend = -1 then keep autosuspend disabled.
 	 *   usbcore.autosuspend = -1 then keep autosuspend disabled.
 	 */
 	 */
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 	if (hdev->dev.power.autosuspend_delay >= 0)
 	if (hdev->dev.power.autosuspend_delay >= 0)
 		pm_runtime_set_autosuspend_delay(&hdev->dev, 0);
 		pm_runtime_set_autosuspend_delay(&hdev->dev, 0);
 #endif
 #endif
@@ -3449,7 +3449,7 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
 	return status;
 	return status;
 }
 }
 
 
-#ifdef	CONFIG_PM_RUNTIME
+#ifdef	CONFIG_PM
 
 
 int usb_remote_wakeup(struct usb_device *udev)
 int usb_remote_wakeup(struct usb_device *udev)
 {
 {
@@ -4856,7 +4856,7 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1,
 			udev->state != USB_STATE_NOTATTACHED) {
 			udev->state != USB_STATE_NOTATTACHED) {
 		if (portstatus & USB_PORT_STAT_ENABLE) {
 		if (portstatus & USB_PORT_STAT_ENABLE) {
 			status = 0;		/* Nothing to do */
 			status = 0;		/* Nothing to do */
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 		} else if (udev->state == USB_STATE_SUSPENDED &&
 		} else if (udev->state == USB_STATE_SUSPENDED &&
 				udev->persist_enabled) {
 				udev->persist_enabled) {
 			/* For a suspended device, treat this as a
 			/* For a suspended device, treat this as a

+ 2 - 2
drivers/usb/core/port.c

@@ -72,7 +72,7 @@ static void usb_port_device_release(struct device *dev)
 	kfree(port_dev);
 	kfree(port_dev);
 }
 }
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int usb_port_runtime_resume(struct device *dev)
 static int usb_port_runtime_resume(struct device *dev)
 {
 {
 	struct usb_port *port_dev = to_usb_port(dev);
 	struct usb_port *port_dev = to_usb_port(dev);
@@ -171,7 +171,7 @@ static int usb_port_runtime_suspend(struct device *dev)
 #endif
 #endif
 
 
 static const struct dev_pm_ops usb_port_pm_ops = {
 static const struct dev_pm_ops usb_port_pm_ops = {
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 	.runtime_suspend =	usb_port_runtime_suspend,
 	.runtime_suspend =	usb_port_runtime_suspend,
 	.runtime_resume =	usb_port_runtime_resume,
 	.runtime_resume =	usb_port_runtime_resume,
 #endif
 #endif

+ 4 - 9
drivers/usb/core/sysfs.c

@@ -334,14 +334,6 @@ static void remove_persist_attributes(struct device *dev)
 			&dev_attr_persist.attr,
 			&dev_attr_persist.attr,
 			power_group_name);
 			power_group_name);
 }
 }
-#else
-
-#define add_persist_attributes(dev)	0
-#define remove_persist_attributes(dev)	do {} while (0)
-
-#endif	/* CONFIG_PM */
-
-#ifdef	CONFIG_PM_RUNTIME
 
 
 static ssize_t connected_duration_show(struct device *dev,
 static ssize_t connected_duration_show(struct device *dev,
 				       struct device_attribute *attr, char *buf)
 				       struct device_attribute *attr, char *buf)
@@ -585,10 +577,13 @@ static void remove_power_attributes(struct device *dev)
 
 
 #else
 #else
 
 
+#define add_persist_attributes(dev)	0
+#define remove_persist_attributes(dev)	do {} while (0)
+
 #define add_power_attributes(dev)	0
 #define add_power_attributes(dev)	0
 #define remove_power_attributes(dev)	do {} while (0)
 #define remove_power_attributes(dev)	do {} while (0)
 
 
-#endif	/* CONFIG_PM_RUNTIME */
+#endif	/* CONFIG_PM */
 
 
 
 
 /* Descriptor fields */
 /* Descriptor fields */

+ 1 - 3
drivers/usb/core/usb.c

@@ -49,7 +49,7 @@ const char *usbcore_name = "usbcore";
 
 
 static bool nousb;	/* Disable USB when built into kernel image */
 static bool nousb;	/* Disable USB when built into kernel image */
 
 
-#ifdef	CONFIG_PM_RUNTIME
+#ifdef	CONFIG_PM
 static int usb_autosuspend_delay = 2;		/* Default delay value,
 static int usb_autosuspend_delay = 2;		/* Default delay value,
 						 * in seconds */
 						 * in seconds */
 module_param_named(autosuspend, usb_autosuspend_delay, int, 0644);
 module_param_named(autosuspend, usb_autosuspend_delay, int, 0644);
@@ -348,11 +348,9 @@ static const struct dev_pm_ops usb_device_pm_ops = {
 	.thaw =		usb_dev_thaw,
 	.thaw =		usb_dev_thaw,
 	.poweroff =	usb_dev_poweroff,
 	.poweroff =	usb_dev_poweroff,
 	.restore =	usb_dev_restore,
 	.restore =	usb_dev_restore,
-#ifdef CONFIG_PM_RUNTIME
 	.runtime_suspend =	usb_runtime_suspend,
 	.runtime_suspend =	usb_runtime_suspend,
 	.runtime_resume =	usb_runtime_resume,
 	.runtime_resume =	usb_runtime_resume,
 	.runtime_idle =		usb_runtime_idle,
 	.runtime_idle =		usb_runtime_idle,
-#endif
 };
 };
 
 
 #endif	/* CONFIG_PM */
 #endif	/* CONFIG_PM */

+ 9 - 14
drivers/usb/core/usb.h

@@ -75,6 +75,14 @@ extern int usb_resume_complete(struct device *dev);
 extern int usb_port_suspend(struct usb_device *dev, pm_message_t msg);
 extern int usb_port_suspend(struct usb_device *dev, pm_message_t msg);
 extern int usb_port_resume(struct usb_device *dev, pm_message_t msg);
 extern int usb_port_resume(struct usb_device *dev, pm_message_t msg);
 
 
+extern void usb_autosuspend_device(struct usb_device *udev);
+extern int usb_autoresume_device(struct usb_device *udev);
+extern int usb_remote_wakeup(struct usb_device *dev);
+extern int usb_runtime_suspend(struct device *dev);
+extern int usb_runtime_resume(struct device *dev);
+extern int usb_runtime_idle(struct device *dev);
+extern int usb_set_usb2_hardware_lpm(struct usb_device *udev, int enable);
+
 #else
 #else
 
 
 static inline int usb_port_suspend(struct usb_device *udev, pm_message_t msg)
 static inline int usb_port_suspend(struct usb_device *udev, pm_message_t msg)
@@ -87,20 +95,6 @@ static inline int usb_port_resume(struct usb_device *udev, pm_message_t msg)
 	return 0;
 	return 0;
 }
 }
 
 
-#endif
-
-#ifdef CONFIG_PM_RUNTIME
-
-extern void usb_autosuspend_device(struct usb_device *udev);
-extern int usb_autoresume_device(struct usb_device *udev);
-extern int usb_remote_wakeup(struct usb_device *dev);
-extern int usb_runtime_suspend(struct device *dev);
-extern int usb_runtime_resume(struct device *dev);
-extern int usb_runtime_idle(struct device *dev);
-extern int usb_set_usb2_hardware_lpm(struct usb_device *udev, int enable);
-
-#else
-
 #define usb_autosuspend_device(udev)		do {} while (0)
 #define usb_autosuspend_device(udev)		do {} while (0)
 static inline int usb_autoresume_device(struct usb_device *udev)
 static inline int usb_autoresume_device(struct usb_device *udev)
 {
 {
@@ -111,6 +105,7 @@ static inline int usb_set_usb2_hardware_lpm(struct usb_device *udev, int enable)
 {
 {
 	return 0;
 	return 0;
 }
 }
+
 #endif
 #endif
 
 
 extern struct bus_type usb_bus_type;
 extern struct bus_type usb_bus_type;

+ 1 - 1
drivers/usb/host/ehci-pci.c

@@ -305,7 +305,7 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
 		}
 		}
 	}
 	}
 
 
-#ifdef	CONFIG_PM_RUNTIME
+#ifdef	CONFIG_PM
 	if (ehci->no_selective_suspend && device_can_wakeup(&pdev->dev))
 	if (ehci->no_selective_suspend && device_can_wakeup(&pdev->dev))
 		ehci_warn(ehci, "selective suspend/wakeup unavailable\n");
 		ehci_warn(ehci, "selective suspend/wakeup unavailable\n");
 #endif
 #endif

+ 2 - 3
drivers/usb/host/sl811-hcd.c

@@ -22,7 +22,7 @@
  * and usb-storage.
  * and usb-storage.
  *
  *
  * TODO:
  * TODO:
- * - usb suspend/resume triggered by sl811 (with PM_RUNTIME)
+ * - usb suspend/resume triggered by sl811
  * - various issues noted in the code
  * - various issues noted in the code
  * - performance work; use both register banks; ...
  * - performance work; use both register banks; ...
  * - use urb->iso_frame_desc[] with ISO transfers
  * - use urb->iso_frame_desc[] with ISO transfers
@@ -1752,8 +1752,7 @@ sl811h_probe(struct platform_device *dev)
 #ifdef	CONFIG_PM
 #ifdef	CONFIG_PM
 
 
 /* for this device there's no useful distinction between the controller
 /* for this device there's no useful distinction between the controller
- * and its root hub, except that the root hub only gets direct PM calls
- * when CONFIG_PM_RUNTIME is enabled.
+ * and its root hub.
  */
  */
 
 
 static int
 static int

+ 1 - 2
drivers/usb/host/u132-hcd.c

@@ -3144,8 +3144,7 @@ static int u132_probe(struct platform_device *pdev)
 #ifdef CONFIG_PM
 #ifdef CONFIG_PM
 /*
 /*
  * for this device there's no useful distinction between the controller
  * for this device there's no useful distinction between the controller
- * and its root hub, except that the root hub only gets direct PM calls
- * when CONFIG_PM_RUNTIME is enabled.
+ * and its root hub.
  */
  */
 static int u132_suspend(struct platform_device *pdev, pm_message_t state)
 static int u132_suspend(struct platform_device *pdev, pm_message_t state)
 {
 {

+ 1 - 1
drivers/usb/host/xhci-hub.c

@@ -1145,7 +1145,7 @@ int xhci_bus_suspend(struct usb_hcd *hcd)
 			set_bit(port_index, &bus_state->bus_suspended);
 			set_bit(port_index, &bus_state->bus_suspended);
 		}
 		}
 		/* USB core sets remote wake mask for USB 3.0 hubs,
 		/* USB core sets remote wake mask for USB 3.0 hubs,
-		 * including the USB 3.0 roothub, but only if CONFIG_PM_RUNTIME
+		 * including the USB 3.0 roothub, but only if CONFIG_PM
 		 * is enabled, so also enable remote wake here.
 		 * is enabled, so also enable remote wake here.
 		 */
 		 */
 		if (hcd->self.root_hub->do_remote_wakeup) {
 		if (hcd->self.root_hub->do_remote_wakeup) {

+ 12 - 17
drivers/usb/host/xhci.c

@@ -4029,7 +4029,7 @@ static int __maybe_unused xhci_change_max_exit_latency(struct xhci_hcd *xhci,
 	return ret;
 	return ret;
 }
 }
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 
 
 /* BESL to HIRD Encoding array for USB2 LPM */
 /* BESL to HIRD Encoding array for USB2 LPM */
 static int xhci_besl_encoding[16] = {125, 150, 200, 300, 400, 500, 1000, 2000,
 static int xhci_besl_encoding[16] = {125, 150, 200, 300, 400, 500, 1000, 2000,
@@ -4244,24 +4244,8 @@ int xhci_update_device(struct usb_hcd *hcd, struct usb_device *udev)
 	return 0;
 	return 0;
 }
 }
 
 
-#else
-
-int xhci_set_usb2_hardware_lpm(struct usb_hcd *hcd,
-				struct usb_device *udev, int enable)
-{
-	return 0;
-}
-
-int xhci_update_device(struct usb_hcd *hcd, struct usb_device *udev)
-{
-	return 0;
-}
-
-#endif /* CONFIG_PM_RUNTIME */
-
 /*---------------------- USB 3.0 Link PM functions ------------------------*/
 /*---------------------- USB 3.0 Link PM functions ------------------------*/
 
 
-#ifdef CONFIG_PM
 /* Service interval in nanoseconds = 2^(bInterval - 1) * 125us * 1000ns / 1us */
 /* Service interval in nanoseconds = 2^(bInterval - 1) * 125us * 1000ns / 1us */
 static unsigned long long xhci_service_interval_to_ns(
 static unsigned long long xhci_service_interval_to_ns(
 		struct usb_endpoint_descriptor *desc)
 		struct usb_endpoint_descriptor *desc)
@@ -4692,6 +4676,17 @@ int xhci_disable_usb3_lpm_timeout(struct usb_hcd *hcd,
 }
 }
 #else /* CONFIG_PM */
 #else /* CONFIG_PM */
 
 
+int xhci_set_usb2_hardware_lpm(struct usb_hcd *hcd,
+				struct usb_device *udev, int enable)
+{
+	return 0;
+}
+
+int xhci_update_device(struct usb_hcd *hcd, struct usb_device *udev)
+{
+	return 0;
+}
+
 int xhci_enable_usb3_lpm_timeout(struct usb_hcd *hcd,
 int xhci_enable_usb3_lpm_timeout(struct usb_hcd *hcd,
 			struct usb_device *udev, enum usb3_link_state state)
 			struct usb_device *udev, enum usb3_link_state state)
 {
 {

+ 1 - 1
drivers/usb/phy/phy-msm-usb.c

@@ -1761,7 +1761,7 @@ static int msm_otg_remove(struct platform_device *pdev)
 	return 0;
 	return 0;
 }
 }
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int msm_otg_runtime_idle(struct device *dev)
 static int msm_otg_runtime_idle(struct device *dev)
 {
 {
 	struct msm_otg *motg = dev_get_drvdata(dev);
 	struct msm_otg *motg = dev_get_drvdata(dev);

+ 1 - 5
include/acpi/acpi_bus.h

@@ -545,6 +545,7 @@ acpi_status acpi_add_pm_notifier(struct acpi_device *adev, struct device *dev,
 				 void (*work_func)(struct work_struct *work));
 				 void (*work_func)(struct work_struct *work));
 acpi_status acpi_remove_pm_notifier(struct acpi_device *adev);
 acpi_status acpi_remove_pm_notifier(struct acpi_device *adev);
 int acpi_pm_device_sleep_state(struct device *, int *, int);
 int acpi_pm_device_sleep_state(struct device *, int *, int);
+int acpi_pm_device_run_wake(struct device *, bool);
 #else
 #else
 static inline acpi_status acpi_add_pm_notifier(struct acpi_device *adev,
 static inline acpi_status acpi_add_pm_notifier(struct acpi_device *adev,
 					       struct device *dev,
 					       struct device *dev,
@@ -564,11 +565,6 @@ static inline int acpi_pm_device_sleep_state(struct device *d, int *p, int m)
 	return (m >= ACPI_STATE_D0 && m <= ACPI_STATE_D3_COLD) ?
 	return (m >= ACPI_STATE_D0 && m <= ACPI_STATE_D3_COLD) ?
 		m : ACPI_STATE_D0;
 		m : ACPI_STATE_D0;
 }
 }
-#endif
-
-#ifdef CONFIG_PM_RUNTIME
-int acpi_pm_device_run_wake(struct device *, bool);
-#else
 static inline int acpi_pm_device_run_wake(struct device *dev, bool enable)
 static inline int acpi_pm_device_run_wake(struct device *dev, bool enable)
 {
 {
 	return -ENODEV;
 	return -ENODEV;

+ 11 - 15
include/linux/acpi.h

@@ -572,16 +572,26 @@ static inline void arch_reserve_mem_area(acpi_physical_address addr,
 #define acpi_os_set_prepare_sleep(func, pm1a_ctrl, pm1b_ctrl) do { } while (0)
 #define acpi_os_set_prepare_sleep(func, pm1a_ctrl, pm1b_ctrl) do { } while (0)
 #endif
 #endif
 
 
-#if defined(CONFIG_ACPI) && defined(CONFIG_PM_RUNTIME)
+#if defined(CONFIG_ACPI) && defined(CONFIG_PM)
 int acpi_dev_runtime_suspend(struct device *dev);
 int acpi_dev_runtime_suspend(struct device *dev);
 int acpi_dev_runtime_resume(struct device *dev);
 int acpi_dev_runtime_resume(struct device *dev);
 int acpi_subsys_runtime_suspend(struct device *dev);
 int acpi_subsys_runtime_suspend(struct device *dev);
 int acpi_subsys_runtime_resume(struct device *dev);
 int acpi_subsys_runtime_resume(struct device *dev);
+struct acpi_device *acpi_dev_pm_get_node(struct device *dev);
+int acpi_dev_pm_attach(struct device *dev, bool power_on);
 #else
 #else
 static inline int acpi_dev_runtime_suspend(struct device *dev) { return 0; }
 static inline int acpi_dev_runtime_suspend(struct device *dev) { return 0; }
 static inline int acpi_dev_runtime_resume(struct device *dev) { return 0; }
 static inline int acpi_dev_runtime_resume(struct device *dev) { return 0; }
 static inline int acpi_subsys_runtime_suspend(struct device *dev) { return 0; }
 static inline int acpi_subsys_runtime_suspend(struct device *dev) { return 0; }
 static inline int acpi_subsys_runtime_resume(struct device *dev) { return 0; }
 static inline int acpi_subsys_runtime_resume(struct device *dev) { return 0; }
+static inline struct acpi_device *acpi_dev_pm_get_node(struct device *dev)
+{
+	return NULL;
+}
+static inline int acpi_dev_pm_attach(struct device *dev, bool power_on)
+{
+	return -ENODEV;
+}
 #endif
 #endif
 
 
 #if defined(CONFIG_ACPI) && defined(CONFIG_PM_SLEEP)
 #if defined(CONFIG_ACPI) && defined(CONFIG_PM_SLEEP)
@@ -604,20 +614,6 @@ static inline int acpi_subsys_suspend(struct device *dev) { return 0; }
 static inline int acpi_subsys_freeze(struct device *dev) { return 0; }
 static inline int acpi_subsys_freeze(struct device *dev) { return 0; }
 #endif
 #endif
 
 
-#if defined(CONFIG_ACPI) && defined(CONFIG_PM)
-struct acpi_device *acpi_dev_pm_get_node(struct device *dev);
-int acpi_dev_pm_attach(struct device *dev, bool power_on);
-#else
-static inline struct acpi_device *acpi_dev_pm_get_node(struct device *dev)
-{
-	return NULL;
-}
-static inline int acpi_dev_pm_attach(struct device *dev, bool power_on)
-{
-	return -ENODEV;
-}
-#endif
-
 #ifdef CONFIG_ACPI
 #ifdef CONFIG_ACPI
 __printf(3, 4)
 __printf(3, 4)
 void acpi_handle_printk(const char *level, acpi_handle handle,
 void acpi_handle_printk(const char *level, acpi_handle handle,

+ 2 - 2
include/linux/blkdev.h

@@ -398,7 +398,7 @@ struct request_queue {
 	 */
 	 */
 	struct kobject mq_kobj;
 	struct kobject mq_kobj;
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 	struct device		*dev;
 	struct device		*dev;
 	int			rpm_status;
 	int			rpm_status;
 	unsigned int		nr_pending;
 	unsigned int		nr_pending;
@@ -1057,7 +1057,7 @@ extern void blk_put_queue(struct request_queue *);
 /*
 /*
  * block layer runtime pm functions
  * block layer runtime pm functions
  */
  */
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 extern void blk_pm_runtime_init(struct request_queue *q, struct device *dev);
 extern void blk_pm_runtime_init(struct request_queue *q, struct device *dev);
 extern int blk_pre_runtime_suspend(struct request_queue *q);
 extern int blk_pre_runtime_suspend(struct request_queue *q);
 extern void blk_post_runtime_suspend(struct request_queue *q, int err);
 extern void blk_post_runtime_suspend(struct request_queue *q, int err);

+ 3 - 10
include/linux/pm.h

@@ -342,7 +342,7 @@ struct dev_pm_ops {
 #define SET_LATE_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn)
 #define SET_LATE_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn)
 #endif
 #endif
 
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 #define SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \
 #define SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \
 	.runtime_suspend = suspend_fn, \
 	.runtime_suspend = suspend_fn, \
 	.runtime_resume = resume_fn, \
 	.runtime_resume = resume_fn, \
@@ -351,14 +351,7 @@ struct dev_pm_ops {
 #define SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn)
 #define SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn)
 #endif
 #endif
 
 
-#ifdef CONFIG_PM
-#define SET_PM_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \
-	.runtime_suspend = suspend_fn, \
-	.runtime_resume = resume_fn, \
-	.runtime_idle = idle_fn,
-#else
-#define SET_PM_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn)
-#endif
+#define SET_PM_RUNTIME_PM_OPS	SET_RUNTIME_PM_OPS
 
 
 /*
 /*
  * Use this if you want to use the same suspend and resume callbacks for suspend
  * Use this if you want to use the same suspend and resume callbacks for suspend
@@ -572,7 +565,7 @@ struct dev_pm_info {
 #else
 #else
 	unsigned int		should_wakeup:1;
 	unsigned int		should_wakeup:1;
 #endif
 #endif
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 	struct timer_list	suspend_timer;
 	struct timer_list	suspend_timer;
 	unsigned long		timer_expires;
 	unsigned long		timer_expires;
 	struct work_struct	work;
 	struct work_struct	work;

+ 2 - 6
include/linux/pm_domain.h

@@ -156,6 +156,7 @@ extern void pm_genpd_init(struct generic_pm_domain *genpd,
 
 
 extern int pm_genpd_poweron(struct generic_pm_domain *genpd);
 extern int pm_genpd_poweron(struct generic_pm_domain *genpd);
 extern int pm_genpd_name_poweron(const char *domain_name);
 extern int pm_genpd_name_poweron(const char *domain_name);
+extern void pm_genpd_poweroff_unused(void);
 
 
 extern struct dev_power_governor simple_qos_governor;
 extern struct dev_power_governor simple_qos_governor;
 extern struct dev_power_governor pm_domain_always_on_gov;
 extern struct dev_power_governor pm_domain_always_on_gov;
@@ -230,6 +231,7 @@ static inline int pm_genpd_name_poweron(const char *domain_name)
 {
 {
 	return -ENOSYS;
 	return -ENOSYS;
 }
 }
+static inline void pm_genpd_poweroff_unused(void) {}
 #define simple_qos_governor NULL
 #define simple_qos_governor NULL
 #define pm_domain_always_on_gov NULL
 #define pm_domain_always_on_gov NULL
 #endif
 #endif
@@ -246,12 +248,6 @@ static inline int pm_genpd_name_add_device(const char *domain_name,
 	return __pm_genpd_name_add_device(domain_name, dev, NULL);
 	return __pm_genpd_name_add_device(domain_name, dev, NULL);
 }
 }
 
 
-#ifdef CONFIG_PM_GENERIC_DOMAINS_RUNTIME
-extern void pm_genpd_poweroff_unused(void);
-#else
-static inline void pm_genpd_poweroff_unused(void) {}
-#endif
-
 #ifdef CONFIG_PM_GENERIC_DOMAINS_SLEEP
 #ifdef CONFIG_PM_GENERIC_DOMAINS_SLEEP
 extern void pm_genpd_syscore_poweroff(struct device *dev);
 extern void pm_genpd_syscore_poweroff(struct device *dev);
 extern void pm_genpd_syscore_poweron(struct device *dev);
 extern void pm_genpd_syscore_poweron(struct device *dev);

+ 17 - 21
include/linux/pm_qos.h

@@ -154,6 +154,23 @@ void dev_pm_qos_constraints_destroy(struct device *dev);
 int dev_pm_qos_add_ancestor_request(struct device *dev,
 int dev_pm_qos_add_ancestor_request(struct device *dev,
 				    struct dev_pm_qos_request *req,
 				    struct dev_pm_qos_request *req,
 				    enum dev_pm_qos_req_type type, s32 value);
 				    enum dev_pm_qos_req_type type, s32 value);
+int dev_pm_qos_expose_latency_limit(struct device *dev, s32 value);
+void dev_pm_qos_hide_latency_limit(struct device *dev);
+int dev_pm_qos_expose_flags(struct device *dev, s32 value);
+void dev_pm_qos_hide_flags(struct device *dev);
+int dev_pm_qos_update_flags(struct device *dev, s32 mask, bool set);
+s32 dev_pm_qos_get_user_latency_tolerance(struct device *dev);
+int dev_pm_qos_update_user_latency_tolerance(struct device *dev, s32 val);
+
+static inline s32 dev_pm_qos_requested_resume_latency(struct device *dev)
+{
+	return dev->power.qos->resume_latency_req->data.pnode.prio;
+}
+
+static inline s32 dev_pm_qos_requested_flags(struct device *dev)
+{
+	return dev->power.qos->flags_req->data.flr.flags;
+}
 #else
 #else
 static inline enum pm_qos_flags_status __dev_pm_qos_flags(struct device *dev,
 static inline enum pm_qos_flags_status __dev_pm_qos_flags(struct device *dev,
 							  s32 mask)
 							  s32 mask)
@@ -200,27 +217,6 @@ static inline int dev_pm_qos_add_ancestor_request(struct device *dev,
 						  enum dev_pm_qos_req_type type,
 						  enum dev_pm_qos_req_type type,
 						  s32 value)
 						  s32 value)
 			{ return 0; }
 			{ return 0; }
-#endif
-
-#ifdef CONFIG_PM_RUNTIME
-int dev_pm_qos_expose_latency_limit(struct device *dev, s32 value);
-void dev_pm_qos_hide_latency_limit(struct device *dev);
-int dev_pm_qos_expose_flags(struct device *dev, s32 value);
-void dev_pm_qos_hide_flags(struct device *dev);
-int dev_pm_qos_update_flags(struct device *dev, s32 mask, bool set);
-s32 dev_pm_qos_get_user_latency_tolerance(struct device *dev);
-int dev_pm_qos_update_user_latency_tolerance(struct device *dev, s32 val);
-
-static inline s32 dev_pm_qos_requested_resume_latency(struct device *dev)
-{
-	return dev->power.qos->resume_latency_req->data.pnode.prio;
-}
-
-static inline s32 dev_pm_qos_requested_flags(struct device *dev)
-{
-	return dev->power.qos->flags_req->data.flr.flags;
-}
-#else
 static inline int dev_pm_qos_expose_latency_limit(struct device *dev, s32 value)
 static inline int dev_pm_qos_expose_latency_limit(struct device *dev, s32 value)
 			{ return 0; }
 			{ return 0; }
 static inline void dev_pm_qos_hide_latency_limit(struct device *dev) {}
 static inline void dev_pm_qos_hide_latency_limit(struct device *dev) {}

+ 9 - 12
include/linux/pm_runtime.h

@@ -35,16 +35,6 @@ extern int pm_generic_runtime_suspend(struct device *dev);
 extern int pm_generic_runtime_resume(struct device *dev);
 extern int pm_generic_runtime_resume(struct device *dev);
 extern int pm_runtime_force_suspend(struct device *dev);
 extern int pm_runtime_force_suspend(struct device *dev);
 extern int pm_runtime_force_resume(struct device *dev);
 extern int pm_runtime_force_resume(struct device *dev);
-#else
-static inline bool queue_pm_work(struct work_struct *work) { return false; }
-
-static inline int pm_generic_runtime_suspend(struct device *dev) { return 0; }
-static inline int pm_generic_runtime_resume(struct device *dev) { return 0; }
-static inline int pm_runtime_force_suspend(struct device *dev) { return 0; }
-static inline int pm_runtime_force_resume(struct device *dev) { return 0; }
-#endif
-
-#ifdef CONFIG_PM_RUNTIME
 
 
 extern int __pm_runtime_idle(struct device *dev, int rpmflags);
 extern int __pm_runtime_idle(struct device *dev, int rpmflags);
 extern int __pm_runtime_suspend(struct device *dev, int rpmflags);
 extern int __pm_runtime_suspend(struct device *dev, int rpmflags);
@@ -128,7 +118,14 @@ static inline void pm_runtime_mark_last_busy(struct device *dev)
 	ACCESS_ONCE(dev->power.last_busy) = jiffies;
 	ACCESS_ONCE(dev->power.last_busy) = jiffies;
 }
 }
 
 
-#else /* !CONFIG_PM_RUNTIME */
+#else /* !CONFIG_PM */
+
+static inline bool queue_pm_work(struct work_struct *work) { return false; }
+
+static inline int pm_generic_runtime_suspend(struct device *dev) { return 0; }
+static inline int pm_generic_runtime_resume(struct device *dev) { return 0; }
+static inline int pm_runtime_force_suspend(struct device *dev) { return 0; }
+static inline int pm_runtime_force_resume(struct device *dev) { return 0; }
 
 
 static inline int __pm_runtime_idle(struct device *dev, int rpmflags)
 static inline int __pm_runtime_idle(struct device *dev, int rpmflags)
 {
 {
@@ -179,7 +176,7 @@ static inline unsigned long pm_runtime_autosuspend_expiration(
 static inline void pm_runtime_set_memalloc_noio(struct device *dev,
 static inline void pm_runtime_set_memalloc_noio(struct device *dev,
 						bool enable){}
 						bool enable){}
 
 
-#endif /* !CONFIG_PM_RUNTIME */
+#endif /* !CONFIG_PM */
 
 
 static inline int pm_runtime_idle(struct device *dev)
 static inline int pm_runtime_idle(struct device *dev)
 {
 {

+ 1 - 1
include/linux/usb.h

@@ -637,7 +637,7 @@ static inline bool usb_acpi_power_manageable(struct usb_device *hdev, int index)
 #endif
 #endif
 
 
 /* USB autosuspend and autoresume */
 /* USB autosuspend and autoresume */
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 extern void usb_enable_autosuspend(struct usb_device *udev);
 extern void usb_enable_autosuspend(struct usb_device *udev);
 extern void usb_disable_autosuspend(struct usb_device *udev);
 extern void usb_disable_autosuspend(struct usb_device *udev);
 
 

+ 2 - 5
include/linux/usb/hcd.h

@@ -93,7 +93,7 @@ struct usb_hcd {
 
 
 	struct timer_list	rh_timer;	/* drives root-hub polling */
 	struct timer_list	rh_timer;	/* drives root-hub polling */
 	struct urb		*status_urb;	/* the current status urb */
 	struct urb		*status_urb;	/* the current status urb */
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 	struct work_struct	wakeup_work;	/* for remote wakeup */
 	struct work_struct	wakeup_work;	/* for remote wakeup */
 #endif
 #endif
 
 
@@ -625,16 +625,13 @@ extern int usb_find_interface_driver(struct usb_device *dev,
 extern void usb_root_hub_lost_power(struct usb_device *rhdev);
 extern void usb_root_hub_lost_power(struct usb_device *rhdev);
 extern int hcd_bus_suspend(struct usb_device *rhdev, pm_message_t msg);
 extern int hcd_bus_suspend(struct usb_device *rhdev, pm_message_t msg);
 extern int hcd_bus_resume(struct usb_device *rhdev, pm_message_t msg);
 extern int hcd_bus_resume(struct usb_device *rhdev, pm_message_t msg);
-#endif /* CONFIG_PM */
-
-#ifdef CONFIG_PM_RUNTIME
 extern void usb_hcd_resume_root_hub(struct usb_hcd *hcd);
 extern void usb_hcd_resume_root_hub(struct usb_hcd *hcd);
 #else
 #else
 static inline void usb_hcd_resume_root_hub(struct usb_hcd *hcd)
 static inline void usb_hcd_resume_root_hub(struct usb_hcd *hcd)
 {
 {
 	return;
 	return;
 }
 }
-#endif /* CONFIG_PM_RUNTIME */
+#endif /* CONFIG_PM */
 
 
 /*-------------------------------------------------------------------------*/
 /*-------------------------------------------------------------------------*/
 
 

+ 1 - 5
kernel/power/Kconfig

@@ -94,6 +94,7 @@ config PM_STD_PARTITION
 config PM_SLEEP
 config PM_SLEEP
 	def_bool y
 	def_bool y
 	depends on SUSPEND || HIBERNATE_CALLBACKS
 	depends on SUSPEND || HIBERNATE_CALLBACKS
+	select PM_RUNTIME
 
 
 config PM_SLEEP_SMP
 config PM_SLEEP_SMP
 	def_bool y
 	def_bool y
@@ -131,7 +132,6 @@ config PM_WAKELOCKS_GC
 
 
 config PM_RUNTIME
 config PM_RUNTIME
 	bool "Run-time PM core functionality"
 	bool "Run-time PM core functionality"
-	depends on !IA64_HP_SIM
 	---help---
 	---help---
 	  Enable functionality allowing I/O devices to be put into energy-saving
 	  Enable functionality allowing I/O devices to be put into energy-saving
 	  (low power) states at run time (or autosuspended) after a specified
 	  (low power) states at run time (or autosuspended) after a specified
@@ -298,10 +298,6 @@ config PM_GENERIC_DOMAINS_SLEEP
 	def_bool y
 	def_bool y
 	depends on PM_SLEEP && PM_GENERIC_DOMAINS
 	depends on PM_SLEEP && PM_GENERIC_DOMAINS
 
 
-config PM_GENERIC_DOMAINS_RUNTIME
-	def_bool y
-	depends on PM_RUNTIME && PM_GENERIC_DOMAINS
-
 config PM_GENERIC_DOMAINS_OF
 config PM_GENERIC_DOMAINS_OF
 	def_bool y
 	def_bool y
 	depends on PM_GENERIC_DOMAINS && OF
 	depends on PM_GENERIC_DOMAINS && OF