virtio: pm: use CONFIG_PM_SLEEP instead of CONFIG_PM
The freeze and restore functions defined in virtio drivers are used for suspend and hibernate, so CONFIG_PM_SLEEP is more appropriate than CONFIG_PM. This patch replace all CONFIG_PM with CONFIG_PM_SLEEP for virtio drivers that implement freeze and restore callbacks. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -954,7 +954,7 @@ static void virtscsi_remove(struct virtio_device *vdev)
|
||||
scsi_host_put(shost);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int virtscsi_freeze(struct virtio_device *vdev)
|
||||
{
|
||||
virtscsi_remove_vqs(vdev);
|
||||
@@ -988,7 +988,7 @@ static struct virtio_driver virtio_scsi_driver = {
|
||||
.id_table = id_table,
|
||||
.probe = virtscsi_probe,
|
||||
.scan = virtscsi_scan,
|
||||
#ifdef CONFIG_PM
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
.freeze = virtscsi_freeze,
|
||||
.restore = virtscsi_restore,
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user