diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-01-01 00:22:46 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-01 16:51:21 -0500 |
commit | aa6027cacdd912ce884953714fcc7392b6155bc6 (patch) | |
tree | af5eb4cbcd0a14d19dd08f829d1db57990441b45 /drivers/net/tg3.c | |
parent | 7dbf6acdbad2fbc6eea72b58404461dcb7c6d9d2 (diff) |
tg3: fix warnings
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>
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r-- | drivers/net/tg3.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 6137869799a4..e3d80c9fb86f 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -15052,6 +15052,7 @@ static void __devexit tg3_remove_one(struct pci_dev *pdev) | |||
15052 | } | 15052 | } |
15053 | } | 15053 | } |
15054 | 15054 | ||
15055 | #ifdef CONFIG_PM_SLEEP | ||
15055 | static int tg3_suspend(struct device *device) | 15056 | static int tg3_suspend(struct device *device) |
15056 | { | 15057 | { |
15057 | struct pci_dev *pdev = to_pci_dev(device); | 15058 | struct pci_dev *pdev = to_pci_dev(device); |
@@ -15140,13 +15141,20 @@ out: | |||
15140 | } | 15141 | } |
15141 | 15142 | ||
15142 | static SIMPLE_DEV_PM_OPS(tg3_pm_ops, tg3_suspend, tg3_resume); | 15143 | static SIMPLE_DEV_PM_OPS(tg3_pm_ops, tg3_suspend, tg3_resume); |
15144 | #define TG3_PM_OPS (&tg3_pm_ops) | ||
15145 | |||
15146 | #else | ||
15147 | |||
15148 | #define TG3_PM_OPS NULL | ||
15149 | |||
15150 | #endif /* CONFIG_PM_SLEEP */ | ||
15143 | 15151 | ||
15144 | static struct pci_driver tg3_driver = { | 15152 | static struct pci_driver tg3_driver = { |
15145 | .name = DRV_MODULE_NAME, | 15153 | .name = DRV_MODULE_NAME, |
15146 | .id_table = tg3_pci_tbl, | 15154 | .id_table = tg3_pci_tbl, |
15147 | .probe = tg3_init_one, | 15155 | .probe = tg3_init_one, |
15148 | .remove = __devexit_p(tg3_remove_one), | 15156 | .remove = __devexit_p(tg3_remove_one), |
15149 | .driver.pm = &tg3_pm_ops, | 15157 | .driver.pm = TG3_PM_OPS, |
15150 | }; | 15158 | }; |
15151 | 15159 | ||
15152 | static int __init tg3_init(void) | 15160 | static int __init tg3_init(void) |