diff options
author | Michel Lespinasse <walken@google.com> | 2011-03-06 11:14:50 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-14 17:22:01 -0400 |
commit | 942527634e201883b39fe0c97a1e47db7a026f91 (patch) | |
tree | d867641098f29a060d8025deffdf3bec269a1d54 /drivers/net/forcedeth.c | |
parent | b3017e6a03d261778ad9450b5510460c4d462203 (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.c | 8 |
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) | |||
5744 | pci_set_drvdata(pci_dev, NULL); | 5744 | pci_set_drvdata(pci_dev, NULL); |
5745 | } | 5745 | } |
5746 | 5746 | ||
5747 | #ifdef CONFIG_PM | 5747 | #ifdef CONFIG_PM_SLEEP |
5748 | static int nv_suspend(struct device *device) | 5748 | static int nv_suspend(struct device *device) |
5749 | { | 5749 | { |
5750 | struct pci_dev *pdev = to_pci_dev(device); | 5750 | struct pci_dev *pdev = to_pci_dev(device); |
@@ -5795,6 +5795,11 @@ static int nv_resume(struct device *device) | |||
5795 | static SIMPLE_DEV_PM_OPS(nv_pm_ops, nv_suspend, nv_resume); | 5795 | static SIMPLE_DEV_PM_OPS(nv_pm_ops, nv_suspend, nv_resume); |
5796 | #define NV_PM_OPS (&nv_pm_ops) | 5796 | #define NV_PM_OPS (&nv_pm_ops) |
5797 | 5797 | ||
5798 | #else | ||
5799 | #define NV_PM_OPS NULL | ||
5800 | #endif /* CONFIG_PM_SLEEP */ | ||
5801 | |||
5802 | #ifdef CONFIG_PM | ||
5798 | static void nv_shutdown(struct pci_dev *pdev) | 5803 | static void nv_shutdown(struct pci_dev *pdev) |
5799 | { | 5804 | { |
5800 | struct net_device *dev = pci_get_drvdata(pdev); | 5805 | struct net_device *dev = pci_get_drvdata(pdev); |
@@ -5822,7 +5827,6 @@ static void nv_shutdown(struct pci_dev *pdev) | |||
5822 | } | 5827 | } |
5823 | } | 5828 | } |
5824 | #else | 5829 | #else |
5825 | #define NV_PM_OPS NULL | ||
5826 | #define nv_shutdown NULL | 5830 | #define nv_shutdown NULL |
5827 | #endif /* CONFIG_PM */ | 5831 | #endif /* CONFIG_PM */ |
5828 | 5832 | ||