Skip to content

Commit

Permalink
tg3: fix warnings
Browse files Browse the repository at this point in the history
In case CONFIG_PM_SLEEP is disabled, we dont need tg3_suspend() and
tg3_resume().

drivers/net/tg3.c:15056: warning: ‘tg3_suspend’ defined but not used
drivers/net/tg3.c:15110: warning: ‘tg3_resume’ defined but not used

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Michael Chan <mchan@broadcom.com>
Cc: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Jan 1, 2011
1 parent 7dbf6ac commit aa6027c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -15052,6 +15052,7 @@ static void __devexit tg3_remove_one(struct pci_dev *pdev)
}
}

#ifdef CONFIG_PM_SLEEP
static int tg3_suspend(struct device *device)
{
struct pci_dev *pdev = to_pci_dev(device);
Expand Down Expand Up @@ -15140,13 +15141,20 @@ static int tg3_resume(struct device *device)
}

static SIMPLE_DEV_PM_OPS(tg3_pm_ops, tg3_suspend, tg3_resume);
#define TG3_PM_OPS (&tg3_pm_ops)

#else

#define TG3_PM_OPS NULL

#endif /* CONFIG_PM_SLEEP */

static struct pci_driver tg3_driver = {
.name = DRV_MODULE_NAME,
.id_table = tg3_pci_tbl,
.probe = tg3_init_one,
.remove = __devexit_p(tg3_remove_one),
.driver.pm = &tg3_pm_ops,
.driver.pm = TG3_PM_OPS,
};

static int __init tg3_init(void)
Expand Down

0 comments on commit aa6027c

Please sign in to comment.