Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 37f0644f authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Mauro Carvalho Chehab
Browse files

[media] ad5820: use __maybe_unused for PM functions



The new ad5820 driver uses #ifdef to hide the suspend/resume functions,
but gets it wrong when CONFIG_PM_SLEEP is disabled:

drivers/media/i2c/ad5820.c:286:12: error: 'ad5820_resume' defined but not used [-Werror=unused-function]
drivers/media/i2c/ad5820.c:274:12: error: 'ad5820_suspend' defined but not used [-Werror=unused-function]

This replaces the #ifdef with a __maybe_unused annotation that is
simpler and harder to get wrong, avoiding the warning.

Fixes: bee3d511 ("[media] ad5820: Add driver for auto-focus coil")

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 47d8e00c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment