mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
Input: rotary_encoder - mark PM methods as __maybe_unused
Instead of guarding PM methods with #ifdef let's mark them as __maybe_unused as it allows for better compile coverage. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
parent
dee520e368
commit
6a6f70b386
1 changed files with 3 additions and 5 deletions
|
@ -383,8 +383,7 @@ static int rotary_encoder_probe(struct platform_device *pdev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PM_SLEEP
|
static int __maybe_unused rotary_encoder_suspend(struct device *dev)
|
||||||
static int rotary_encoder_suspend(struct device *dev)
|
|
||||||
{
|
{
|
||||||
struct rotary_encoder *encoder = dev_get_drvdata(dev);
|
struct rotary_encoder *encoder = dev_get_drvdata(dev);
|
||||||
|
|
||||||
|
@ -396,7 +395,7 @@ static int rotary_encoder_suspend(struct device *dev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int rotary_encoder_resume(struct device *dev)
|
static int __maybe_unused rotary_encoder_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
struct rotary_encoder *encoder = dev_get_drvdata(dev);
|
struct rotary_encoder *encoder = dev_get_drvdata(dev);
|
||||||
|
|
||||||
|
@ -407,7 +406,6 @@ static int rotary_encoder_resume(struct device *dev)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static SIMPLE_DEV_PM_OPS(rotary_encoder_pm_ops,
|
static SIMPLE_DEV_PM_OPS(rotary_encoder_pm_ops,
|
||||||
rotary_encoder_suspend, rotary_encoder_resume);
|
rotary_encoder_suspend, rotary_encoder_resume);
|
||||||
|
|
Loading…
Add table
Reference in a new issue