From: Fabio Estevam <festevam@gmail.com>
To: dmitry.torokhov@gmail.com
Cc: beomho.seo@samsung.com, linux-input@vger.kernel.org,
Fabio Estevam <fabio.estevam@freescale.com>
Subject: [PATCH 2/2] Input: mcs5000_ts - Remove ifdef
Date: Wed, 30 Jul 2014 13:17:19 -0300 [thread overview]
Message-ID: <1406737039-1404-2-git-send-email-festevam@gmail.com> (raw)
In-Reply-To: <1406737039-1404-1-git-send-email-festevam@gmail.com>
From: Fabio Estevam <fabio.estevam@freescale.com>
We can annonate the suspend/resume functions with '__maybe_unused' and get rid
of the ifdef, which makes the code smaller and simpler.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
drivers/input/touchscreen/mcs5000_ts.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/input/touchscreen/mcs5000_ts.c b/drivers/input/touchscreen/mcs5000_ts.c
index 1fb760c..8b47e1f 100644
--- a/drivers/input/touchscreen/mcs5000_ts.c
+++ b/drivers/input/touchscreen/mcs5000_ts.c
@@ -248,8 +248,7 @@ static int mcs5000_ts_probe(struct i2c_client *client,
return 0;
}
-#ifdef CONFIG_PM_SLEEP
-static int mcs5000_ts_suspend(struct device *dev)
+static int __maybe_unused mcs5000_ts_suspend(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
@@ -259,7 +258,7 @@ static int mcs5000_ts_suspend(struct device *dev)
return 0;
}
-static int mcs5000_ts_resume(struct device *dev)
+static int __maybe_unused mcs5000_ts_resume(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
struct mcs5000_ts_data *data = i2c_get_clientdata(client);
@@ -269,7 +268,6 @@ static int mcs5000_ts_resume(struct device *dev)
return 0;
}
-#endif
static SIMPLE_DEV_PM_OPS(mcs5000_ts_pm, mcs5000_ts_suspend, mcs5000_ts_resume);
--
1.9.1
next prev parent reply other threads:[~2014-07-30 16:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-30 16:17 [PATCH 1/2] Input: mcs5000_ts - Protect PM functions with CONFIG_PM_SLEEP Fabio Estevam
2014-07-30 16:17 ` Fabio Estevam [this message]
2014-07-31 6:01 ` [PATCH 2/2] Input: mcs5000_ts - Remove ifdef Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1406737039-1404-2-git-send-email-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=beomho.seo@samsung.com \
--cc=dmitry.torokhov@gmail.com \
--cc=fabio.estevam@freescale.com \
--cc=linux-input@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).