Skip to content

Commit

Permalink
drivers/net: fix build warnings with CONFIG_PM_SLEEP disabled
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
walken-google authored and davem330 committed Mar 14, 2011
1 parent b3017e6 commit 9425276
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions drivers/net/forcedeth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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 */

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -4983,7 +4983,7 @@ static int sky2_suspend(struct device *dev)
return 0;
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static int sky2_resume(struct device *dev)
{
struct pci_dev *pdev = to_pci_dev(dev);
Expand Down

0 comments on commit 9425276

Please sign in to comment.