From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: linux-media@vger.kernel.org
Cc: arnd@arndb.de
Subject: [PATCH v2 2/2] smiapp: Make suspend and resume functions __maybe_unused
Date: Sun, 20 Nov 2016 00:24:26 +0200 [thread overview]
Message-ID: <1479594266-3034-3-git-send-email-sakari.ailus@linux.intel.com> (raw)
In-Reply-To: <1479594266-3034-1-git-send-email-sakari.ailus@linux.intel.com>
The smiapp_suspend() and smiapp_resume() functions will end up being unused
if CONFIG_PM is enabled but CONFIG_PM_SLEEP is disabled, causing a
compiler warning from both of the function definitions. Fix this by
marking the functions with __maybe_unused.
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
drivers/media/i2c/smiapp/smiapp-core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c
index b20886f..ab48a85 100644
--- a/drivers/media/i2c/smiapp/smiapp-core.c
+++ b/drivers/media/i2c/smiapp/smiapp-core.c
@@ -2741,7 +2741,7 @@ static const struct v4l2_subdev_internal_ops smiapp_internal_ops = {
* I2C Driver
*/
-static int smiapp_suspend(struct device *dev)
+static int __maybe_unused smiapp_suspend(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
struct v4l2_subdev *subdev = i2c_get_clientdata(client);
@@ -2766,7 +2766,7 @@ static int smiapp_suspend(struct device *dev)
return 0;
}
-static int smiapp_resume(struct device *dev)
+static int __maybe_unused smiapp_resume(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
struct v4l2_subdev *subdev = i2c_get_clientdata(client);
--
2.1.4
prev parent reply other threads:[~2016-11-19 22:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-19 22:24 [PATCH v2 0/2] smiapp fix for w/o CONFIG_PM, compiler warnings Sakari Ailus
2016-11-19 22:24 ` [PATCH v2 1/2] smiapp: Implement power-on and power-off sequences without runtime PM Sakari Ailus
2016-11-29 17:28 ` [PATCH v2.1 " Sakari Ailus
2016-11-29 17:35 ` Laurent Pinchart
2016-11-30 11:29 ` Sakari Ailus
2016-11-30 16:11 ` [PATCH v2.2 " Sakari Ailus
2016-11-19 22:24 ` Sakari Ailus [this message]
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=1479594266-3034-3-git-send-email-sakari.ailus@linux.intel.com \
--to=sakari.ailus@linux.intel.com \
--cc=arnd@arndb.de \
--cc=linux-media@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).