mirror of
https://github.com/torvalds/linux.git
synced 2025-11-05 03:00:13 +02:00
soundwire: intel: fix intel_suspend/resume defined but not used warning
When CONFIG_PM_SLEEP is not defined, GCC throws compilation warnings:
drivers/soundwire/intel.c:1799:12: warning: ‘intel_resume’ defined but not
used [-Wunused-function]
static int intel_resume(struct device *dev)
^~~~~~~~~~~~
drivers/soundwire/intel.c:1683:12: warning: ‘intel_suspend’ defined but not
used [-Wunused-function]
static int intel_suspend(struct device *dev)
^~~~~~~~~~~~~
Fix by using __maybe_unused macro.
Suggested-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200824133234.28115-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
08abad9f45
commit
f046b23340
1 changed files with 2 additions and 2 deletions
|
|
@ -1527,7 +1527,7 @@ int intel_master_process_wakeen_event(struct platform_device *pdev)
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
|
|
||||||
static int intel_suspend(struct device *dev)
|
static int __maybe_unused intel_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
struct sdw_cdns *cdns = dev_get_drvdata(dev);
|
struct sdw_cdns *cdns = dev_get_drvdata(dev);
|
||||||
struct sdw_intel *sdw = cdns_to_intel(cdns);
|
struct sdw_intel *sdw = cdns_to_intel(cdns);
|
||||||
|
|
@ -1625,7 +1625,7 @@ static int intel_suspend_runtime(struct device *dev)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int intel_resume(struct device *dev)
|
static int __maybe_unused intel_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
struct sdw_cdns *cdns = dev_get_drvdata(dev);
|
struct sdw_cdns *cdns = dev_get_drvdata(dev);
|
||||||
struct sdw_intel *sdw = cdns_to_intel(cdns);
|
struct sdw_intel *sdw = cdns_to_intel(cdns);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue