OSDN Git Service

igb: Define igb_pm_ops conditionally on CONFIG_PM
authorTom Rix <trix@redhat.com>
Fri, 28 Apr 2023 20:00:09 +0000 (16:00 -0400)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 18 May 2023 16:11:32 +0000 (09:11 -0700)
commit7271522b729b80d9581f4b3debef0e942d3a1049
treeaba16104106e9f05c9a27f9873b8cba95b3fc5fb
parent95b681485563c64585de78662ee52d06b7fa47d9
igb: Define igb_pm_ops conditionally on CONFIG_PM

For s390, gcc with W=1 reports
drivers/net/ethernet/intel/igb/igb_main.c:186:32: error:
  'igb_pm_ops' defined but not used [-Werror=unused-const-variable=]
  186 | static const struct dev_pm_ops igb_pm_ops = {
      |                                ^~~~~~~~~~

The only use of igb_pm_ops is conditional on CONFIG_PM.
The definition of igb_pm_ops should also be conditional on CONFIG_PM

Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/igb/igb_main.c