Skip to content

Commit

Permalink
soundwire: intel: fix CONFIG_PM and CONFIG_PM_SLEEP confusion
Browse files Browse the repository at this point in the history
When CONFIG_PM_SLEEP is not defined, GCC throws compilation warnings:

drivers/soundwire/intel.c:1816:12: warning: ‘intel_resume’ defined but
not used [-Wunused-function]
 1816 | static int intel_resume(struct device *dev)
      |            ^~~~~~~~~~~~

drivers/soundwire/intel.c:1697:12: warning: ‘intel_suspend’ defined
but not used [-Wunused-function]
 1697 | static int intel_suspend(struct device *dev)

Fix by adding the missing CONFIG_PM_SLEEP.

Note that we could move code around and use only 2 ifdefs, but this
will generate conflicts so let's do this when all the pm handling is
merged.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
  • Loading branch information
plbossart committed Jul 7, 2020
1 parent d1e300b commit 7622bf3
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions drivers/soundwire/intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1684,7 +1684,7 @@ int intel_master_process_wakeen_event(struct platform_device *pdev)
* PM calls
*/

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP

static int intel_suspend(struct device *dev)
{
Expand Down Expand Up @@ -1741,6 +1741,9 @@ static int intel_suspend(struct device *dev)

return 0;
}
#endif

#ifdef CONFIG_PM

static int intel_suspend_runtime(struct device *dev)
{
Expand Down Expand Up @@ -1804,6 +1807,9 @@ static int intel_suspend_runtime(struct device *dev)

return ret;
}
#endif

#ifdef CONFIG_PM_SLEEP

static int intel_resume(struct device *dev)
{
Expand Down Expand Up @@ -1899,6 +1905,9 @@ static int intel_resume(struct device *dev)

return ret;
}
#endif

#ifdef CONFIG_PM

static int intel_resume_runtime(struct device *dev)
{
Expand Down Expand Up @@ -2074,7 +2083,6 @@ static int intel_resume_runtime(struct device *dev)

return ret;
}

#endif

static const struct dev_pm_ops intel_pm = {
Expand Down

0 comments on commit 7622bf3

Please sign in to comment.