Re: [PATCH 1/2] [media] ad5820: use __maybe_unused for PM functions

From: Sakari Ailus
Date: Tue Sep 13 2016 - 04:32:05 EST


On Mon, Sep 12, 2016 at 07:52:08PM +0200, Pavel Machek wrote:
> On Mon 2016-09-12 17:32:57, Arnd Bergmann wrote:
> > 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.
> >
> > Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
> > Fixes: bee3d5115611 ("[media] ad5820: Add driver for auto-focus
> coil")
>
> Thanks!
>
> Acked-by: Pavel Machek <pavel@xxxxxx>

Thanks, Arnd and Pavel!

Added to my ad5820 branch.

--
Sakari Ailus
e-mail: sakari.ailus@xxxxxx XMPP: sailus@xxxxxxxxxxxxxx