diff options
author | Aaron Lu <aaron.lu@intel.com> | 2013-09-08 20:27:12 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2013-09-08 20:32:53 -0400 |
commit | 9e266ece2178784a1027e04a56c8547dc51b15ce (patch) | |
tree | 3d7e42e7721d137438df05d6e4884aa36e7e5ba1 | |
parent | aa96a3c686b001a651c86dcb5b0b73d1a9b1d1ca (diff) |
virtio_pci: pm: Use CONFIG_PM_SLEEP instead of CONFIG_PM
The virtio_pci_freeze/restore are defined under CONFIG_PM but is used
by SET_SYSTEM_SLEEP_PM_OPS macro, which is defined under
CONFIG_PM_SLEEP. So if CONFIG_PM_SLEEP is not cofigured but
CONFIG_PM_RUNTIME is, the following warning message appeared:
drivers/virtio/virtio_pci.c:770:12: warning: ‘virtio_pci_freeze’ defined but not used [-Wunused-function]
static int virtio_pci_freeze(struct device *dev)
^
drivers/virtio/virtio_pci.c:790:12: warning: ‘virtio_pci_restore’ defined but not used [-Wunused-function]
static int virtio_pci_restore(struct device *dev)
^
Fix it by changing CONFIG_PM to CONFIG_PM_SLEEP.
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/virtio/virtio_pci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index 1aba255b5879..98917fc872a4 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c | |||
@@ -766,7 +766,7 @@ static void virtio_pci_remove(struct pci_dev *pci_dev) | |||
766 | kfree(vp_dev); | 766 | kfree(vp_dev); |
767 | } | 767 | } |
768 | 768 | ||
769 | #ifdef CONFIG_PM | 769 | #ifdef CONFIG_PM_SLEEP |
770 | static int virtio_pci_freeze(struct device *dev) | 770 | static int virtio_pci_freeze(struct device *dev) |
771 | { | 771 | { |
772 | struct pci_dev *pci_dev = to_pci_dev(dev); | 772 | struct pci_dev *pci_dev = to_pci_dev(dev); |
@@ -824,7 +824,7 @@ static struct pci_driver virtio_pci_driver = { | |||
824 | .id_table = virtio_pci_id_table, | 824 | .id_table = virtio_pci_id_table, |
825 | .probe = virtio_pci_probe, | 825 | .probe = virtio_pci_probe, |
826 | .remove = virtio_pci_remove, | 826 | .remove = virtio_pci_remove, |
827 | #ifdef CONFIG_PM | 827 | #ifdef CONFIG_PM_SLEEP |
828 | .driver.pm = &virtio_pci_pm_ops, | 828 | .driver.pm = &virtio_pci_pm_ops, |
829 | #endif | 829 | #endif |
830 | }; | 830 | }; |