mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
mfd: as3722: Mark PM functions as __maybe_unused
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: Arnd Bergmann <[email protected]>
Fixes: 35deff7eb2 ("mfd: as3722: Handle interrupts on suspend")
Signed-off-by: Lee Jones <[email protected]>
This commit is contained in:
parent
d91d76d84c
commit
a7b956fd38
1 changed files with 2 additions and 2 deletions
|
|
@ -424,7 +424,7 @@ static int as3722_i2c_remove(struct i2c_client *i2c)
|
|||
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);
|
||||
|
||||
|
|
@ -435,7 +435,7 @@ static int as3722_i2c_suspend(struct device *dev)
|
|||
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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue