Commit 4f23bd5d authored by Bjorn Helgaas's avatar Bjorn Helgaas

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.orgSigned-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent f2906aa8
...@@ -125,14 +125,14 @@ Following piece of code illustrates the usage of the SR-IOV API. ...@@ -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; 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. ...@@ -165,8 +165,7 @@ Following piece of code illustrates the usage of the SR-IOV API.
.id_table = dev_id_table, .id_table = dev_id_table,
.probe = dev_probe, .probe = dev_probe,
.remove = dev_remove, .remove = dev_remove,
.suspend = dev_suspend, .driver.pm = &dev_pm_ops,
.resume = dev_resume,
.shutdown = dev_shutdown, .shutdown = dev_shutdown,
.sriov_configure = dev_sriov_configure, .sriov_configure = dev_sriov_configure,
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment