]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Input: mpr121 - annotate PM methods as __maybe_unused
authorAkinobu Mita <akinobu.mita@gmail.com>
Sun, 15 Jan 2017 22:43:15 +0000 (14:43 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 15 Jan 2017 23:08:40 +0000 (15:08 -0800)
Instead of using #ifdef, let's mark suspend and resume methods as
__maybe_unused to provide better compile coverage.

Suggested-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/mpr121_touchkey.c

index 0fd612dd76edec57f8cf18d5ea6df87f06de56cb..a3fd6e5ebfb5aefee4c849c6285479c8e0038705 100644 (file)
@@ -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);
 
@@ -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);
@@ -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);