summaryrefslogtreecommitdiff
path: root/drivers/net/forcedeth.c
diff options
context:
space:
mode:
authorMichel Lespinasse <walken@google.com>2011-03-06 16:14:50 +0000
committerDavid S. Miller <davem@davemloft.net>2011-03-14 14:22:01 -0700
commit942527634e201883b39fe0c97a1e47db7a026f91 (patch)
treed867641098f29a060d8025deffdf3bec269a1d54 /drivers/net/forcedeth.c
parentb3017e6a03d261778ad9450b5510460c4d462203 (diff)
drivers/net: fix build warnings with CONFIG_PM_SLEEP disabled
This fixes a couple of build warnings when CONFIG_PM is enabled but CONFIG_PM_SLEEP is disabled. Applies on top of v2.6.38-rc7 - I know it's late, but it would be great if v2.6.38 could compile without warnings! Signed-off-by: Michel Lespinasse <walken@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/forcedeth.c')
-rw-r--r--drivers/net/forcedeth.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index 9c0b1bac6af6..7b92897ca66b 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -5744,7 +5744,7 @@ static void __devexit nv_remove(struct pci_dev *pci_dev)
pci_set_drvdata(pci_dev, NULL);
}
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
static int nv_suspend(struct device *device)
{
struct pci_dev *pdev = to_pci_dev(device);
@@ -5795,6 +5795,11 @@ static int nv_resume(struct device *device)
static SIMPLE_DEV_PM_OPS(nv_pm_ops, nv_suspend, nv_resume);
#define NV_PM_OPS (&nv_pm_ops)
+#else
+#define NV_PM_OPS NULL
+#endif /* CONFIG_PM_SLEEP */
+
+#ifdef CONFIG_PM
static void nv_shutdown(struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
@@ -5822,7 +5827,6 @@ static void nv_shutdown(struct pci_dev *pdev)
}
}
#else
-#define NV_PM_OPS NULL
#define nv_shutdown NULL
#endif /* CONFIG_PM */