Skip to contentSkip to conversation

drivers: pci: Add in description of pci_set_power_state

PATCH Applied Piotr Gregor 2 participants 2 messages Aug 2, 2017 – Aug 3, 2017 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers: pci: Add in description of pci_set_power_state

Add two reasons of returning 0 value to the description of the pci_set_power_state to include the cases when:

- the transition is to D1 or D2 but D1 and D2 are not supported
- the transition is to D3 but D3 is not supported.

---
 drivers/pci/pci.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/pci/pci.c +2 -0
index af0cc34..9528781 100644
@@ -892,7 +892,9 @@ EXPORT_SYMBOL_GPL(__pci_complete_power_transition);
  * -EINVAL if the requested state is invalid.
  * -EIO if device does not support PCI PM or its PM capabilities register has a
  * wrong version, or device doesn't support the requested state.
+ * 0 if the transition is to D1 or D2 but D1 and D2 are not supported.
  * 0 if device already is in the requested state.
+ * 0 if the transition is to D3 but D3 is not supported.
  * 0 if device's power state has been successfully changed.
  */
 int pci_set_power_state(struct pci_dev *dev, pci_power_t state)
Signature · 1 line
2.1.4
#1 lore raw
Quoted 7 lines · Piotr Gregor

Add two reasons of returning 0 value to the description of the pci_set_power_state to include the cases when:

- the transition is to D1 or D2 but D1 and D2 are not supported
- the transition is to D3 but D3 is not supported.

Applied to pci/pm for v4.14, thanks!

Quoted 21 lines
---
 drivers/pci/pci.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/pci/pci.c +2 -0
index af0cc34..9528781 100644
@@ -892,7 +892,9 @@ EXPORT_SYMBOL_GPL(__pci_complete_power_transition);
  * -EINVAL if the requested state is invalid.
  * -EIO if device does not support PCI PM or its PM capabilities register has a
  * wrong version, or device doesn't support the requested state.
+ * 0 if the transition is to D1 or D2 but D1 and D2 are not supported.
  * 0 if device already is in the requested state.
+ * 0 if the transition is to D3 but D3 is not supported.
  * 0 if device's power state has been successfully changed.
  */
 int pci_set_power_state(struct pci_dev *dev, pci_power_t state)
Signature · 1 line
2.1.4