Re: [PATCH 2/2] hid: add PM support to PicoLCD device

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

 



On Tue, 27 Apr 2010, Bruno Prémont wrote:

> > > +#ifdef CONFIG_PM
> > > +static void picolcd_suspend_backlight(struct picolcd_data *data)
> > > +{
> > > +	int bl_power = data->lcd_power;
> > > +	if (!data->backlight)
> > > +		return;
> > > +
> > > +	data->backlight->props.power = FB_BLANK_POWERDOWN;
> > > +	picolcd_set_brightness(data->backlight);
> > > +	data->lcd_power = data->backlight->props.power = bl_power;
> > > +}
> > > +#else
> > > +#define picolcd_suspend_backlight(a)
> > > +#endif /* CONFIG_PM */
> > 
> > Stylistic thing -- it would be nice if this was actually 
> > 
> > static inline void picolcd_suspend_backlight(struct picolcd_data *data)
> > {
> > 	return 0;
> > }
> > 
> > But why do you need to have it defined in !CONFIG_PM situation anyway? 
> > It's not used otherwise at all.
> 
> Yeah, I could drop the #else branch (of #ifconfig CONFIG_PM).

Yup, please do so.

> Is gcc quiet about defined but unused static inline functions?

Yup, -Wunused-function doesn't warn about unused static inline function.

-- 
Jiri Kosina
SUSE Labs, Novell Inc.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux