Commit 298cb0f1 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Sebastian Reichel

power: ipaq-micro-battery: use __maybe_unused to hide pm functions

The ipaq micro battery driver has suspend/resume functions that
are accessed using SIMPLE_DEV_PM_OPS, which hide the reference
when CONFIG_PM_SLEEP is not set, resulting in a warning about
unused functions:

drivers/power/ipaq_micro_battery.c:284:12: error: 'micro_batt_suspend' defined but not used [-Werror=unused-function]
drivers/power/ipaq_micro_battery.c:292:12: error: 'micro_batt_resume' defined but not used [-Werror=unused-function]

This adds __maybe_unused annotations to let the compiler know
it can silently drop the function definition.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
parent 9761dca6
...@@ -281,7 +281,7 @@ static int micro_batt_remove(struct platform_device *pdev) ...@@ -281,7 +281,7 @@ static int micro_batt_remove(struct platform_device *pdev)
return 0; return 0;
} }
static int micro_batt_suspend(struct device *dev) static int __maybe_unused micro_batt_suspend(struct device *dev)
{ {
struct micro_battery *mb = dev_get_drvdata(dev); struct micro_battery *mb = dev_get_drvdata(dev);
...@@ -289,7 +289,7 @@ static int micro_batt_suspend(struct device *dev) ...@@ -289,7 +289,7 @@ static int micro_batt_suspend(struct device *dev)
return 0; return 0;
} }
static int micro_batt_resume(struct device *dev) static int __maybe_unused micro_batt_resume(struct device *dev)
{ {
struct micro_battery *mb = dev_get_drvdata(dev); struct micro_battery *mb = dev_get_drvdata(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment