Jingoo Han <jg1.han@xxxxxxxxxxx> writes: > Use SIMPLE_DEV_PM_OPS macro in order to make the code simpler. > > Signed-off-by: Jingoo Han <jg1.han@xxxxxxxxxxx> This patch is obviously wrong. It won't compile without CONFIG_PM_SLEEP. Cheers, Rusty. > --- > drivers/virtio/virtio_pci.c | 9 +++------ > 1 file changed, 3 insertions(+), 6 deletions(-) > > diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c > index 3d1463c6b120..c5fbdb4023d1 100644 > --- a/drivers/virtio/virtio_pci.c > +++ b/drivers/virtio/virtio_pci.c > @@ -810,20 +810,17 @@ static int virtio_pci_restore(struct device *dev) > > return ret; > } > - > -static const struct dev_pm_ops virtio_pci_pm_ops = { > - SET_SYSTEM_SLEEP_PM_OPS(virtio_pci_freeze, virtio_pci_restore) > -}; > #endif > > +static SIMPLE_DEV_PM_OPS(virtio_pci_pm_ops, virtio_pci_freeze, > + virtio_pci_restore); > + > static struct pci_driver virtio_pci_driver = { > .name = "virtio-pci", > .id_table = virtio_pci_id_table, > .probe = virtio_pci_probe, > .remove = virtio_pci_remove, > -#ifdef CONFIG_PM_SLEEP > .driver.pm = &virtio_pci_pm_ops, > -#endif > }; > > module_pci_driver(virtio_pci_driver); > -- > 2.0.0 _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linuxfoundation.org/mailman/listinfo/virtualization