Skip to content

Commit

Permalink
Input: rotary_encoder - mark PM methods as __maybe_unused
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
dtor committed Mar 2, 2016
1 parent dee520e commit 6a6f70b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions drivers/input/misc/rotary_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,7 @@ static int rotary_encoder_probe(struct platform_device *pdev)
return 0;
}

#ifdef CONFIG_PM_SLEEP
static int rotary_encoder_suspend(struct device *dev)
static int __maybe_unused rotary_encoder_suspend(struct device *dev)
{
struct rotary_encoder *encoder = dev_get_drvdata(dev);

Expand All @@ -396,7 +395,7 @@ static int rotary_encoder_suspend(struct device *dev)
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);

Expand All @@ -407,10 +406,9 @@ static int rotary_encoder_resume(struct device *dev)

return 0;
}
#endif

static SIMPLE_DEV_PM_OPS(rotary_encoder_pm_ops,
rotary_encoder_suspend, rotary_encoder_resume);
rotary_encoder_suspend, rotary_encoder_resume);

static struct platform_driver rotary_encoder_driver = {
.probe = rotary_encoder_probe,
Expand Down

0 comments on commit 6a6f70b

Please sign in to comment.