diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2022-06-08 02:29:46 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2022-07-12 02:17:29 +0300 |
commit | 4f23bd5d09af41b04d30dcba85ea1303b3669b9f (patch) | |
tree | 4aa9cdc67acc1d9044a5b2fabf8f3b98175beb17 /Documentation/PCI/pci-iov-howto.rst | |
parent | f2906aa863381afb0015a9eb7fefad885d4e5a56 (diff) | |
download | linux-4f23bd5d09af41b04d30dcba85ea1303b3669b9f.tar.xz |
PCI/doc: Convert examples to generic power management
PCI-specific power management (pci_driver.suspend and pci_driver.resume) is
deprecated. Convert sample code to the generic power management framework.
Link: https://lore.kernel.org/r/20220607232946.355987-1-helgaas@kernel.org
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'Documentation/PCI/pci-iov-howto.rst')
-rw-r--r-- | Documentation/PCI/pci-iov-howto.rst | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Documentation/PCI/pci-iov-howto.rst b/Documentation/PCI/pci-iov-howto.rst index b9fd003206f1..27d35933cea2 100644 --- a/Documentation/PCI/pci-iov-howto.rst +++ b/Documentation/PCI/pci-iov-howto.rst @@ -125,14 +125,14 @@ Following piece of code illustrates the usage of the SR-IOV API. ... } - static int dev_suspend(struct pci_dev *dev, pm_message_t state) + static int dev_suspend(struct device *dev) { ... return 0; } - static int dev_resume(struct pci_dev *dev) + static int dev_resume(struct device *dev) { ... @@ -165,8 +165,7 @@ Following piece of code illustrates the usage of the SR-IOV API. .id_table = dev_id_table, .probe = dev_probe, .remove = dev_remove, - .suspend = dev_suspend, - .resume = dev_resume, + .driver.pm = &dev_pm_ops, .shutdown = dev_shutdown, .sriov_configure = dev_sriov_configure, }; |