Skip to content

Commit

Permalink
mfd: ipaq-micro: Use __maybe_unused to hide pm functions
Browse files Browse the repository at this point in the history
The ipaq-micro driver uses SET_SYSTEM_SLEEP_PM_OPS() to
remove the reference to its resume function, but does
not use an #ifdef around the definition, so we get
a build warning:

drivers/mfd/ipaq-micro.c:379:12: error: 'micro_resume' defined but not used [-Werror=unused-function]

This adds a __maybe_unused annotation so the compiler knows
it can silently drop it instead of warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
  • Loading branch information
Arnd Bergmann authored and Lee Jones committed Mar 16, 2016
1 parent 95a6f71 commit dcdf117
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mfd/ipaq-micro.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ static const struct mfd_cell micro_cells[] = {
{ .name = "ipaq-micro-leds", },
};

static int micro_resume(struct device *dev)
static int __maybe_unused micro_resume(struct device *dev)
{
struct ipaq_micro *micro = dev_get_drvdata(dev);

Expand Down

0 comments on commit dcdf117

Please sign in to comment.