Skip to content

Commit

Permalink
[media] smiapp: Make suspend and resume functions __maybe_unused
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
  • Loading branch information
Sakari Ailus authored and Mauro Carvalho Chehab committed Dec 21, 2016
1 parent 9447082 commit 4bfb934
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/i2c/smiapp/smiapp-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 4bfb934

Please sign in to comment.