aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Lu <aaron.lu@intel.com>2013-09-16 19:55:23 -0400
committerRusty Russell <rusty@rustcorp.com.au>2013-09-23 02:15:58 -0400
commit891070003999e7ac8881bba6f8242615382742eb (patch)
treeb9688861a4446b3fb58fc0c49a0816424b7617a8
parentd8524ae9d6f492a9c6db9f4d89c5f9b8782fa2d5 (diff)
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>
-rw-r--r--drivers/block/virtio_blk.c4
-rw-r--r--drivers/char/hw_random/virtio-rng.c4
-rw-r--r--drivers/char/virtio_console.c4
-rw-r--r--drivers/net/virtio_net.c4
-rw-r--r--drivers/scsi/virtio_scsi.c4
-rw-r--r--drivers/virtio/virtio_balloon.c4
6 files changed, 12 insertions, 12 deletions
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 5cdf88b7ad9e..89245b5adca1 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -899,7 +899,7 @@ static void virtblk_remove(struct virtio_device *vdev)
899 ida_simple_remove(&vd_index_ida, index); 899 ida_simple_remove(&vd_index_ida, index);
900} 900}
901 901
902#ifdef CONFIG_PM 902#ifdef CONFIG_PM_SLEEP
903static int virtblk_freeze(struct virtio_device *vdev) 903static int virtblk_freeze(struct virtio_device *vdev)
904{ 904{
905 struct virtio_blk *vblk = vdev->priv; 905 struct virtio_blk *vblk = vdev->priv;
@@ -959,7 +959,7 @@ static struct virtio_driver virtio_blk = {
959 .probe = virtblk_probe, 959 .probe = virtblk_probe,
960 .remove = virtblk_remove, 960 .remove = virtblk_remove,
961 .config_changed = virtblk_config_changed, 961 .config_changed = virtblk_config_changed,
962#ifdef CONFIG_PM 962#ifdef CONFIG_PM_SLEEP
963 .freeze = virtblk_freeze, 963 .freeze = virtblk_freeze,
964 .restore = virtblk_restore, 964 .restore = virtblk_restore,
965#endif 965#endif
diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c
index ef46a9cfd832..c12398d1517c 100644
--- a/drivers/char/hw_random/virtio-rng.c
+++ b/drivers/char/hw_random/virtio-rng.c
@@ -133,7 +133,7 @@ static void virtrng_remove(struct virtio_device *vdev)
133 remove_common(vdev); 133 remove_common(vdev);
134} 134}
135 135
136#ifdef CONFIG_PM 136#ifdef CONFIG_PM_SLEEP
137static int virtrng_freeze(struct virtio_device *vdev) 137static int virtrng_freeze(struct virtio_device *vdev)
138{ 138{
139 remove_common(vdev); 139 remove_common(vdev);
@@ -157,7 +157,7 @@ static struct virtio_driver virtio_rng_driver = {
157 .id_table = id_table, 157 .id_table = id_table,
158 .probe = virtrng_probe, 158 .probe = virtrng_probe,
159 .remove = virtrng_remove, 159 .remove = virtrng_remove,
160#ifdef CONFIG_PM 160#ifdef CONFIG_PM_SLEEP
161 .freeze = virtrng_freeze, 161 .freeze = virtrng_freeze,
162 .restore = virtrng_restore, 162 .restore = virtrng_restore,
163#endif 163#endif
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index b79cf3e1b793..862fd54a0ffb 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -2142,7 +2142,7 @@ static struct virtio_device_id rproc_serial_id_table[] = {
2142static unsigned int rproc_serial_features[] = { 2142static unsigned int rproc_serial_features[] = {
2143}; 2143};
2144 2144
2145#ifdef CONFIG_PM 2145#ifdef CONFIG_PM_SLEEP
2146static int virtcons_freeze(struct virtio_device *vdev) 2146static int virtcons_freeze(struct virtio_device *vdev)
2147{ 2147{
2148 struct ports_device *portdev; 2148 struct ports_device *portdev;
@@ -2220,7 +2220,7 @@ static struct virtio_driver virtio_console = {
2220 .probe = virtcons_probe, 2220 .probe = virtcons_probe,
2221 .remove = virtcons_remove, 2221 .remove = virtcons_remove,
2222 .config_changed = config_intr, 2222 .config_changed = config_intr,
2223#ifdef CONFIG_PM 2223#ifdef CONFIG_PM_SLEEP
2224 .freeze = virtcons_freeze, 2224 .freeze = virtcons_freeze,
2225 .restore = virtcons_restore, 2225 .restore = virtcons_restore,
2226#endif 2226#endif
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index defec2b3c5a4..2ad3d96d4a7c 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -1683,7 +1683,7 @@ static void virtnet_remove(struct virtio_device *vdev)
1683 free_netdev(vi->dev); 1683 free_netdev(vi->dev);
1684} 1684}
1685 1685
1686#ifdef CONFIG_PM 1686#ifdef CONFIG_PM_SLEEP
1687static int virtnet_freeze(struct virtio_device *vdev) 1687static int virtnet_freeze(struct virtio_device *vdev)
1688{ 1688{
1689 struct virtnet_info *vi = vdev->priv; 1689 struct virtnet_info *vi = vdev->priv;
@@ -1766,7 +1766,7 @@ static struct virtio_driver virtio_net_driver = {
1766 .probe = virtnet_probe, 1766 .probe = virtnet_probe,
1767 .remove = virtnet_remove, 1767 .remove = virtnet_remove,
1768 .config_changed = virtnet_config_changed, 1768 .config_changed = virtnet_config_changed,
1769#ifdef CONFIG_PM 1769#ifdef CONFIG_PM_SLEEP
1770 .freeze = virtnet_freeze, 1770 .freeze = virtnet_freeze,
1771 .restore = virtnet_restore, 1771 .restore = virtnet_restore,
1772#endif 1772#endif
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index 74b88efde6ad..2a110391f8ce 100644
--- a/drivers/scsi/virtio_scsi.c
+++ b/drivers/scsi/virtio_scsi.c
@@ -954,7 +954,7 @@ static void virtscsi_remove(struct virtio_device *vdev)
954 scsi_host_put(shost); 954 scsi_host_put(shost);
955} 955}
956 956
957#ifdef CONFIG_PM 957#ifdef CONFIG_PM_SLEEP
958static int virtscsi_freeze(struct virtio_device *vdev) 958static int virtscsi_freeze(struct virtio_device *vdev)
959{ 959{
960 virtscsi_remove_vqs(vdev); 960 virtscsi_remove_vqs(vdev);
@@ -988,7 +988,7 @@ static struct virtio_driver virtio_scsi_driver = {
988 .id_table = id_table, 988 .id_table = id_table,
989 .probe = virtscsi_probe, 989 .probe = virtscsi_probe,
990 .scan = virtscsi_scan, 990 .scan = virtscsi_scan,
991#ifdef CONFIG_PM 991#ifdef CONFIG_PM_SLEEP
992 .freeze = virtscsi_freeze, 992 .freeze = virtscsi_freeze,
993 .restore = virtscsi_restore, 993 .restore = virtscsi_restore,
994#endif 994#endif
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index 1f572c00a1be..d6f681641606 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -513,7 +513,7 @@ static void virtballoon_remove(struct virtio_device *vdev)
513 kfree(vb); 513 kfree(vb);
514} 514}
515 515
516#ifdef CONFIG_PM 516#ifdef CONFIG_PM_SLEEP
517static int virtballoon_freeze(struct virtio_device *vdev) 517static int virtballoon_freeze(struct virtio_device *vdev)
518{ 518{
519 struct virtio_balloon *vb = vdev->priv; 519 struct virtio_balloon *vb = vdev->priv;
@@ -556,7 +556,7 @@ static struct virtio_driver virtio_balloon_driver = {
556 .probe = virtballoon_probe, 556 .probe = virtballoon_probe,
557 .remove = virtballoon_remove, 557 .remove = virtballoon_remove,
558 .config_changed = virtballoon_changed, 558 .config_changed = virtballoon_changed,
559#ifdef CONFIG_PM 559#ifdef CONFIG_PM_SLEEP
560 .freeze = virtballoon_freeze, 560 .freeze = virtballoon_freeze,
561 .restore = virtballoon_restore, 561 .restore = virtballoon_restore,
562#endif 562#endif