Skip to content

Commit 4f163bf

Browse files
Tom Rixdavem330
authored andcommitted
net: atlantic: Define aq_pm_ops conditionally on CONFIG_PM
For s390, gcc with W=1 reports drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c:458:32: error: 'aq_pm_ops' defined but not used [-Werror=unused-const-variable=] 458 | static const struct dev_pm_ops aq_pm_ops = { | ^~~~~~~~~ The only use of aq_pm_ops is conditional on CONFIG_PM. The definition of aq_pm_ops and its functions should also be conditional on CONFIG_PM. Signed-off-by: Tom Rix <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 281900a commit 4f163bf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ static void aq_pci_shutdown(struct pci_dev *pdev)
379379
}
380380
}
381381

382+
#ifdef CONFIG_PM
382383
static int aq_suspend_common(struct device *dev)
383384
{
384385
struct aq_nic_s *nic = pci_get_drvdata(to_pci_dev(dev));
@@ -463,6 +464,7 @@ static const struct dev_pm_ops aq_pm_ops = {
463464
.restore = aq_pm_resume_restore,
464465
.thaw = aq_pm_thaw,
465466
};
467+
#endif
466468

467469
static struct pci_driver aq_pci_ops = {
468470
.name = AQ_CFG_DRV_NAME,

0 commit comments

Comments
 (0)