RE: [PATCH 2/2 v2] pwm_bl: Add mandatory backlight enable regulator

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

 



> > +static void pwm_backlight_enable(struct backlight_device *bl) {
> > +	struct pwm_bl_data *pb = dev_get_drvdata(&bl->dev);
> > +
> > +	/* Bail if we are already enabled. */
> > +	if (pb->enabled)
> > +		return;
> > +
> > +	pwm_enable(pb->pwm);
> > +
> > +	if (regulator_enable(pb->enable_supply) != 0)
> 
> I would loose the '!= 0'

I think I prefer the '!= 0'.  Without it, it looks at first glance
like regulator_enable() is following boolean semantics,
so it reads kind of weird.  But I'll defer to Thierry on this
one.  Thierry, what's your preference?
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux