Commit 2d1a7923 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Dmitry Torokhov

Input: snvs_pwrkey - use __maybe_unused to hide pm functions

The SNVS power key 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/input/keyboard/snvs_pwrkey.c:183:12: error: 'imx_snvs_pwrkey_suspend' defined but not used [-Werror=unused-function]
drivers/input/keyboard/snvs_pwrkey.c:194:12: error: 'imx_snvs_pwrkey_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>
Acked-by: default avatarFrank Li <Frank.Li@nxp.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 7ffae990
...@@ -180,7 +180,7 @@ static int imx_snvs_pwrkey_probe(struct platform_device *pdev) ...@@ -180,7 +180,7 @@ static int imx_snvs_pwrkey_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int imx_snvs_pwrkey_suspend(struct device *dev) static int __maybe_unused imx_snvs_pwrkey_suspend(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev); struct platform_device *pdev = to_platform_device(dev);
struct pwrkey_drv_data *pdata = platform_get_drvdata(pdev); struct pwrkey_drv_data *pdata = platform_get_drvdata(pdev);
...@@ -191,7 +191,7 @@ static int imx_snvs_pwrkey_suspend(struct device *dev) ...@@ -191,7 +191,7 @@ static int imx_snvs_pwrkey_suspend(struct device *dev)
return 0; return 0;
} }
static int imx_snvs_pwrkey_resume(struct device *dev) static int __maybe_unused imx_snvs_pwrkey_resume(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev); struct platform_device *pdev = to_platform_device(dev);
struct pwrkey_drv_data *pdata = platform_get_drvdata(pdev); struct pwrkey_drv_data *pdata = platform_get_drvdata(pdev);
......
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