Skip to content

Commit

Permalink
Input: mpr121 - annotate PM methods as __maybe_unused
Browse files Browse the repository at this point in the history
Instead of using #ifdef, let's mark suspend and resume methods as
__maybe_unused to provide better compile coverage.

Suggested-by: Dmitry Torokhov <[email protected]>
Signed-off-by: Akinobu Mita <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
  • Loading branch information
mita authored and dtor committed Jan 15, 2017
1 parent aa142ed commit 890fa16
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/input/keyboard/mpr121_touchkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,7 @@ static int mpr_touchkey_probe(struct i2c_client *client,
return 0;
}

#ifdef CONFIG_PM_SLEEP
static int mpr_suspend(struct device *dev)
static int __maybe_unused mpr_suspend(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);

Expand All @@ -279,7 +278,7 @@ static int mpr_suspend(struct device *dev)
return 0;
}

static int mpr_resume(struct device *dev)
static int __maybe_unused mpr_resume(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
struct mpr121_touchkey *mpr121 = i2c_get_clientdata(client);
Expand All @@ -292,7 +291,6 @@ static int mpr_resume(struct device *dev)

return 0;
}
#endif

static SIMPLE_DEV_PM_OPS(mpr121_touchkey_pm_ops, mpr_suspend, mpr_resume);

Expand Down

0 comments on commit 890fa16

Please sign in to comment.