aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/egalax_ts.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2014-11-02 00:04:14 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-11-02 00:10:07 -0700
commit02b6a58b83b2f3d97addaf96ef60ad6596bf715f (patch)
tree4389eb074ceb36b9925e22e0c5dcb349e24fd503 /drivers/input/touchscreen/egalax_ts.c
parentInput: mouse - use __maybe_unused instead of ifdef around suspend/resume (diff)
downloadlinux-dev-02b6a58b83b2f3d97addaf96ef60ad6596bf715f.tar.xz
linux-dev-02b6a58b83b2f3d97addaf96ef60ad6596bf715f.zip
Input: touchscreen - use __maybe_unused instead of ifdef around suspend/resume
Use __maybe_unused instead of ifdef guards around suspend/resume functions, in order to increase build coverage and fix build warnings. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen/egalax_ts.c')
-rw-r--r--drivers/input/touchscreen/egalax_ts.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/input/touchscreen/egalax_ts.c b/drivers/input/touchscreen/egalax_ts.c
index c8057847d71d..4c56299284ef 100644
--- a/drivers/input/touchscreen/egalax_ts.c
+++ b/drivers/input/touchscreen/egalax_ts.c
@@ -239,8 +239,7 @@ static const struct i2c_device_id egalax_ts_id[] = {
};
MODULE_DEVICE_TABLE(i2c, egalax_ts_id);
-#ifdef CONFIG_PM_SLEEP
-static int egalax_ts_suspend(struct device *dev)
+static int __maybe_unused egalax_ts_suspend(struct device *dev)
{
static const u8 suspend_cmd[MAX_I2C_DATA_LEN] = {
0x3, 0x6, 0xa, 0x3, 0x36, 0x3f, 0x2, 0, 0, 0
@@ -252,13 +251,12 @@ static int egalax_ts_suspend(struct device *dev)
return ret > 0 ? 0 : ret;
}
-static int egalax_ts_resume(struct device *dev)
+static int __maybe_unused egalax_ts_resume(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
return egalax_wake_up_device(client);
}
-#endif
static SIMPLE_DEV_PM_OPS(egalax_ts_pm_ops, egalax_ts_suspend, egalax_ts_resume);