Re: [PATCH] backlight: pwm_bl: Use SIMPLE_DEV_PM_OPS()

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

 



Mon, 31 Mar 2014 09:16:38 +0100 от Lee Jones <lee.jones@xxxxxxxxxx>:
> > > > Use the SIMPLE_DEV_PM_OPS() macro to declare the driver's pm_ops.
> > > > 
> > > > Signed-off-by: Alexander Shiyan <shc_work@xxxxxxx>
> > > > ---
> > > >  drivers/video/backlight/pwm_bl.c | 17 ++++-------------
> > > >  1 file changed, 4 insertions(+), 13 deletions(-)
> > > > 
> > > > diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
> > > > index b75201f..d5e1f5b 100644
> > > > --- a/drivers/video/backlight/pwm_bl.c
> > > > +++ b/drivers/video/backlight/pwm_bl.c
> > > 
> > > [...]
> > > 
> > > > -static int pwm_backlight_resume(struct device *dev)
> > > > +static int __maybe_unused pwm_bl_resume(struct device *dev)
> > > 
> > > What's the __maybe_unused attribute for?
> > > 
> > > In include/linux/compiler-gcc.h it redefines the attribute as 'unused': 
> > > 
> > >   #define __maybe_unused                  __attribute__((unused))
> > > 
> > > ... are you sure this is what you want?
> > 
> > Yes. This avoids compiler warnings if CONFIG_PM is unset.
> 
> What are the advantages of this over the config option? Besides 2
> lines of code?

Just an increase compile coverage.

---

��.n��������+%������w��{.n�����{����n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�


[Index of Archives]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Tourism]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux