From: Aaron Lu <aaron.lu@intel.com>
To: Amit Shah <amit.shah@redhat.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
virtualization@lists.linux-foundation.org,
linux-pm@vger.kernel.org
Subject: [PATCH 1/2] virtio_pci: pm: Use CONFIG_PM_SLEEP instead of CONFIG_PM
Date: Fri, 6 Sep 2013 16:20:06 +0800 [thread overview]
Message-ID: <1378455607-32459-2-git-send-email-aaron.lu@intel.com> (raw)
In-Reply-To: <1378455607-32459-1-git-send-email-aaron.lu@intel.com>
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>
---
drivers/virtio/virtio_pci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 1aba255..98917fc 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)
kfree(vp_dev);
}
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
static int virtio_pci_freeze(struct device *dev)
{
struct pci_dev *pci_dev = to_pci_dev(dev);
@@ -824,7 +824,7 @@ static struct pci_driver virtio_pci_driver = {
.id_table = virtio_pci_id_table,
.probe = virtio_pci_probe,
.remove = virtio_pci_remove,
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
.driver.pm = &virtio_pci_pm_ops,
#endif
};
--
1.8.4.12.g2ea3df6
next prev parent reply other threads:[~2013-09-06 8:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-06 8:20 [PATCH 0/2] virtio: Replace CONFIG_PM with CONFIG_PM_SLEEP Aaron Lu
2013-09-06 8:20 ` Aaron Lu [this message]
2013-09-06 8:20 ` [PATCH 2/2] virtio: pm: use CONFIG_PM_SLEEP instead of CONFIG_PM Aaron Lu
2013-09-06 8:22 ` [PATCH 0/2] virtio: Replace CONFIG_PM with CONFIG_PM_SLEEP Amit Shah
2013-09-06 8:29 ` Aaron Lu
2013-09-09 0:39 ` Rusty Russell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1378455607-32459-2-git-send-email-aaron.lu@intel.com \
--to=aaron.lu@intel.com \
--cc=amit.shah@redhat.com \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=rusty@rustcorp.com.au \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).