Skip to content

Commit e075155

Browse files
committed
PM: sleep: core: Rename DPM_FLAG_NEVER_SKIP
Rename DPM_FLAG_NEVER_SKIP to DPM_FLAG_NO_DIRECT_COMPLETE which matches its purpose more closely. No functional impact. Suggested-by: Alan Stern <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]> Acked-by: Bjorn Helgaas <[email protected]> # for PCI parts Acked-by: Jeff Kirsher <[email protected]> Acked-by: Alan Stern <[email protected]> Acked-by: Bjorn Helgaas <[email protected]> Acked-by: Alex Deucher <[email protected]>
1 parent fa2bfea commit e075155

File tree

13 files changed

+21
-21
lines changed

13 files changed

+21
-21
lines changed

Documentation/driver-api/pm/devices.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,9 +361,9 @@ the phases are: ``prepare``, ``suspend``, ``suspend_late``, ``suspend_noirq``.
361361
runtime PM disabled.
362362

363363
This feature also can be controlled by device drivers by using the
364-
``DPM_FLAG_NEVER_SKIP`` and ``DPM_FLAG_SMART_PREPARE`` driver power
365-
management flags. [Typically, they are set at the time the driver is
366-
probed against the device in question by passing them to the
364+
``DPM_FLAG_NO_DIRECT_COMPLETE`` and ``DPM_FLAG_SMART_PREPARE`` driver
365+
power management flags. [Typically, they are set at the time the driver
366+
is probed against the device in question by passing them to the
367367
:c:func:`dev_pm_set_driver_flags` helper function.] If the first of
368368
these flags is set, the PM core will not apply the direct-complete
369369
procedure described above to the given device and, consequenty, to any

Documentation/power/pci.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,11 +1004,11 @@ including the PCI bus type. The flags should be set once at the driver probe
10041004
time with the help of the dev_pm_set_driver_flags() function and they should not
10051005
be updated directly afterwards.
10061006

1007-
The DPM_FLAG_NEVER_SKIP flag prevents the PM core from using the direct-complete
1008-
mechanism allowing device suspend/resume callbacks to be skipped if the device
1009-
is in runtime suspend when the system suspend starts. That also affects all of
1010-
the ancestors of the device, so this flag should only be used if absolutely
1011-
necessary.
1007+
The DPM_FLAG_NO_DIRECT_COMPLETE flag prevents the PM core from using the
1008+
direct-complete mechanism allowing device suspend/resume callbacks to be skipped
1009+
if the device is in runtime suspend when the system suspend starts. That also
1010+
affects all of the ancestors of the device, so this flag should only be used if
1011+
absolutely necessary.
10121012

10131013
The DPM_FLAG_SMART_PREPARE flag instructs the PCI bus type to only return a
10141014
positive value from pci_pm_prepare() if the ->prepare callback provided by the

drivers/base/power/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1844,7 +1844,7 @@ static int device_prepare(struct device *dev, pm_message_t state)
18441844
spin_lock_irq(&dev->power.lock);
18451845
dev->power.direct_complete = state.event == PM_EVENT_SUSPEND &&
18461846
(ret > 0 || dev->power.no_pm_callbacks) &&
1847-
!dev_pm_test_driver_flags(dev, DPM_FLAG_NEVER_SKIP);
1847+
!dev_pm_test_driver_flags(dev, DPM_FLAG_NO_DIRECT_COMPLETE);
18481848
spin_unlock_irq(&dev->power.lock);
18491849
return 0;
18501850
}

drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ int amdgpu_driver_load_kms(struct drm_device *dev, unsigned long flags)
191191
}
192192

193193
if (adev->runpm) {
194-
dev_pm_set_driver_flags(dev->dev, DPM_FLAG_NEVER_SKIP);
194+
dev_pm_set_driver_flags(dev->dev, DPM_FLAG_NO_DIRECT_COMPLETE);
195195
pm_runtime_use_autosuspend(dev->dev);
196196
pm_runtime_set_autosuspend_delay(dev->dev, 5000);
197197
pm_runtime_set_active(dev->dev);

drivers/gpu/drm/i915/intel_runtime_pm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ void intel_runtime_pm_enable(struct intel_runtime_pm *rpm)
549549
* becaue the HDA driver may require us to enable the audio power
550550
* domain during system suspend.
551551
*/
552-
dev_pm_set_driver_flags(kdev, DPM_FLAG_NEVER_SKIP);
552+
dev_pm_set_driver_flags(kdev, DPM_FLAG_NO_DIRECT_COMPLETE);
553553

554554
pm_runtime_set_autosuspend_delay(kdev, 10000); /* 10s */
555555
pm_runtime_mark_last_busy(kdev);

drivers/gpu/drm/radeon/radeon_kms.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)
158158
}
159159

160160
if (radeon_is_px(dev)) {
161-
dev_pm_set_driver_flags(dev->dev, DPM_FLAG_NEVER_SKIP);
161+
dev_pm_set_driver_flags(dev->dev, DPM_FLAG_NO_DIRECT_COMPLETE);
162162
pm_runtime_use_autosuspend(dev->dev);
163163
pm_runtime_set_autosuspend_delay(dev->dev, 5000);
164164
pm_runtime_set_active(dev->dev);

drivers/misc/mei/pci-me.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ static int mei_me_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
240240
* MEI requires to resume from runtime suspend mode
241241
* in order to perform link reset flow upon system suspend.
242242
*/
243-
dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NEVER_SKIP);
243+
dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NO_DIRECT_COMPLETE);
244244

245245
/*
246246
* ME maps runtime suspend/resume to D0i states,

drivers/misc/mei/pci-txe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ static int mei_txe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
128128
* MEI requires to resume from runtime suspend mode
129129
* in order to perform link reset flow upon system suspend.
130130
*/
131-
dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NEVER_SKIP);
131+
dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NO_DIRECT_COMPLETE);
132132

133133
/*
134134
* TXE maps runtime suspend/resume to own power gating states,

drivers/net/ethernet/intel/e1000e/netdev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7549,7 +7549,7 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
75497549

75507550
e1000_print_device_info(adapter);
75517551

7552-
dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NEVER_SKIP);
7552+
dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NO_DIRECT_COMPLETE);
75537553

75547554
if (pci_dev_run_wake(pdev) && hw->mac.type < e1000_pch_cnp)
75557555
pm_runtime_put_noidle(&pdev->dev);

drivers/net/ethernet/intel/igb/igb_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3445,7 +3445,7 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
34453445
}
34463446
}
34473447

3448-
dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NEVER_SKIP);
3448+
dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NO_DIRECT_COMPLETE);
34493449

34503450
pm_runtime_put_noidle(&pdev->dev);
34513451
return 0;

0 commit comments

Comments
 (0)