Skip to content

Commit

Permalink
[media] s5p_cec: mark suspend/resume as __maybe_unused
Browse files Browse the repository at this point in the history
The suspend/resume functions in the s5p-cec driver are only
referenced when CONFIG_PM is enabled, so we get a warning
about unused functions otherwise:

drivers/staging/media/s5p-cec/s5p_cec.c:260:12: error: 's5p_cec_resume' defined but not used [-Werror=unused-function]
 static int s5p_cec_resume(struct device *dev)
            ^~~~~~~~~~~~~~
drivers/staging/media/s5p-cec/s5p_cec.c:253:12: error: 's5p_cec_suspend' defined but not used [-Werror=unused-function]
 static int s5p_cec_suspend(struct device *dev)

This marks them as __maybe_unused to avoid the warning without
having to introduce an extra #ifdef.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
  • Loading branch information
Arnd Bergmann authored and Mauro Carvalho Chehab committed Jul 8, 2016
1 parent f8db65f commit aee8937
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/media/s5p-cec/s5p_cec.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,14 @@ static int s5p_cec_runtime_resume(struct device *dev)
return 0;
}

static int s5p_cec_suspend(struct device *dev)
static int __maybe_unused s5p_cec_suspend(struct device *dev)
{
if (pm_runtime_suspended(dev))
return 0;
return s5p_cec_runtime_suspend(dev);
}

static int s5p_cec_resume(struct device *dev)
static int __maybe_unused s5p_cec_resume(struct device *dev)
{
if (pm_runtime_suspended(dev))
return 0;
Expand Down

0 comments on commit aee8937

Please sign in to comment.