Commit f22d0419 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Stefan Bader

mfd: as3722: Mark PM functions as __maybe_unused

BugLink: https://bugs.launchpad.net/bugs/1818815

commit a7b956fd upstream.

The newly introduced as3722_i2c_suspend/resume functions are built
unconditionally, but only used when power management is enabled,
so we get a warning otherwise:

drivers/mfd/as3722.c:427:12: warning: 'as3722_i2c_suspend' defined but not used [-Wunused-function]
drivers/mfd/as3722.c:438:12: warning: 'as3722_i2c_resume' defined but not used [-Wunused-function]

This marks them both as __maybe_unused, which avoids an ugly #ifdef
and gives us best compile-time coverage. When they are unused, the
compiler will silently drop the functions from its output.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Fixes: 35deff7e ("mfd: as3722: Handle interrupts on suspend")
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Cc: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
parent 95e548d7
...@@ -424,7 +424,7 @@ static int as3722_i2c_remove(struct i2c_client *i2c) ...@@ -424,7 +424,7 @@ static int as3722_i2c_remove(struct i2c_client *i2c)
return 0; return 0;
} }
static int as3722_i2c_suspend(struct device *dev) static int __maybe_unused as3722_i2c_suspend(struct device *dev)
{ {
struct as3722 *as3722 = dev_get_drvdata(dev); struct as3722 *as3722 = dev_get_drvdata(dev);
...@@ -435,7 +435,7 @@ static int as3722_i2c_suspend(struct device *dev) ...@@ -435,7 +435,7 @@ static int as3722_i2c_suspend(struct device *dev)
return 0; return 0;
} }
static int as3722_i2c_resume(struct device *dev) static int __maybe_unused as3722_i2c_resume(struct device *dev)
{ {
struct as3722 *as3722 = dev_get_drvdata(dev); struct as3722 *as3722 = 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