Skip to content

Commit

Permalink
netxen: fix build with without CONFIG_PM
Browse files Browse the repository at this point in the history
wrap pci suspend() and resume() with CONFIG_PM check.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dhananjay Phadke authored and David S. Miller committed Jun 23, 2009
1 parent 4d900f9 commit 01542cd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/netxen/netxen_nic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,7 @@ static void __devexit netxen_nic_remove(struct pci_dev *pdev)
free_netdev(netdev);
}

#ifdef CONFIG_PM
static int
netxen_nic_suspend(struct pci_dev *pdev, pm_message_t state)
{
Expand Down Expand Up @@ -1242,6 +1243,7 @@ netxen_nic_resume(struct pci_dev *pdev)

return 0;
}
#endif

static int netxen_nic_open(struct net_device *netdev)
{
Expand Down Expand Up @@ -1771,8 +1773,10 @@ static struct pci_driver netxen_driver = {
.id_table = netxen_pci_tbl,
.probe = netxen_nic_probe,
.remove = __devexit_p(netxen_nic_remove),
#ifdef CONFIG_PM
.suspend = netxen_nic_suspend,
.resume = netxen_nic_resume
#endif
};

/* Driver Registration on NetXen card */
Expand Down

0 comments on commit 01542cd

Please sign in to comment.