Skip to content

Commit f878d0b

Browse files
committed
virtio-pci: switch to PM ops macro to initialise PM functions
Use the SET_SYSTEM_SLEEP_PM_OPS macro to initialise the suspend/resume functions in the new PM API. Signed-off-by: Amit Shah <[email protected]>
1 parent 04c2322 commit f878d0b

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

drivers/virtio/virtio_pci.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -768,12 +768,7 @@ static int virtio_pci_restore(struct device *dev)
768768
}
769769

770770
static const struct dev_pm_ops virtio_pci_pm_ops = {
771-
.suspend = virtio_pci_freeze,
772-
.resume = virtio_pci_restore,
773-
.freeze = virtio_pci_freeze,
774-
.thaw = virtio_pci_restore,
775-
.restore = virtio_pci_restore,
776-
.poweroff = virtio_pci_freeze,
771+
SET_SYSTEM_SLEEP_PM_OPS(virtio_pci_freeze, virtio_pci_restore)
777772
};
778773
#endif
779774

0 commit comments

Comments
 (0)