* [net-next] e1000e: fix the build error when PM is disabled
@ 2014-03-18 7:26 Jeff Kirsher
2014-03-18 17:26 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Jeff Kirsher @ 2014-03-18 7:26 UTC (permalink / raw)
To: davem; +Cc: Kevin Hao, netdev, gospo, sassmann, Jeff Kirsher
From: Kevin Hao <haokexin@gmail.com>
The commit 2800209994f8 (e1000e: Refactor PM flows) changed the
SET_SYSTEM_SLEEP_PM_OPS to open-coded assignment, but forgot to
protect them with CONFIG_PM_SLEEP. Then cause the following build
error when PM is disabled:
drivers/net/ethernet/intel/e1000e/netdev.c:7079:13:
error: 'e1000e_pm_suspend' undeclared here (not in a function)
.suspend = e1000e_pm_suspend,
^
drivers/net/ethernet/intel/e1000e/netdev.c:7080:13:
error: 'e1000e_pm_resume' undeclared here (not in a function)
.resume = e1000e_pm_resume,
^
drivers/net/ethernet/intel/e1000e/netdev.c:7082:11:
error: 'e1000e_pm_thaw' undeclared here (not in a function)
.thaw = e1000e_pm_thaw,
^
Signed-off-by: Kevin Hao <haokexin@gmail.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/e1000e/netdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 3f044e7..eafad41 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -7076,12 +7076,14 @@ static DEFINE_PCI_DEVICE_TABLE(e1000_pci_tbl) = {
MODULE_DEVICE_TABLE(pci, e1000_pci_tbl);
static const struct dev_pm_ops e1000_pm_ops = {
+#ifdef CONFIG_PM_SLEEP
.suspend = e1000e_pm_suspend,
.resume = e1000e_pm_resume,
.freeze = e1000e_pm_freeze,
.thaw = e1000e_pm_thaw,
.poweroff = e1000e_pm_suspend,
.restore = e1000e_pm_resume,
+#endif
SET_RUNTIME_PM_OPS(e1000e_pm_runtime_suspend, e1000e_pm_runtime_resume,
e1000e_pm_runtime_idle)
};
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [net-next] e1000e: fix the build error when PM is disabled
2014-03-18 7:26 [net-next] e1000e: fix the build error when PM is disabled Jeff Kirsher
@ 2014-03-18 17:26 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-03-18 17:26 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: haokexin, netdev, gospo, sassmann
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 18 Mar 2014 00:26:49 -0700
> From: Kevin Hao <haokexin@gmail.com>
>
> The commit 2800209994f8 (e1000e: Refactor PM flows) changed the
> SET_SYSTEM_SLEEP_PM_OPS to open-coded assignment, but forgot to
> protect them with CONFIG_PM_SLEEP. Then cause the following build
> error when PM is disabled:
...
> Signed-off-by: Kevin Hao <haokexin@gmail.com>
> Tested-by: Aaron Brown <aaron.f.brown@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-18 17:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-18 7:26 [net-next] e1000e: fix the build error when PM is disabled Jeff Kirsher
2014-03-18 17:26 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).