Re: [PATCH] ALSA: ac97: Switch to dev_pm_ops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 07, 2015 at 10:13:48AM +0200, Lars-Peter Clausen wrote:
> On 08/07/2015 12:55 AM, Dmitry Torokhov wrote:
> [...]
> >>  
> >> -#ifdef CONFIG_PM
> >> -static int wm97xx_suspend(struct device *dev, pm_message_t state)
> >> +#ifdef CONFIG_PM_SLEEP
> >> +static int wm97xx_suspend(struct device *dev)
> > 
> > While we are changing it please drop #ifdef CONFIG_PM_SLEEP and annotate
> > suspend and resume with __maybe_unused.
> 
> We know that it is used when CONFIG_PM_SLEEP is defined and we know that it
> is unused CONFIG_PM_SLEEP is not defined. Marking the function as
> __maybe_unused will cause the compiler to not generate a warning when the
> function is really unused. Making this explicit works much better.

It will also drop the code form the final image and having the functions
in provides better compile coverage.

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux