lkml.org 
[lkml]   [2012]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 1/2] lp855x_bl: use generic PWM functions
Date
> Generally this looks good. Obviously you'll need to update any users of
> this driver as well. It might make sense to include those changes in
> this patch to avoid interim build failures.

Thanks for your review.
So far no usages for this driver in the mainline.
I've tested it in my own development environment instead.

> Other than that I have just one smaller comment below.
>
> > + pwm_config(lp->pwm, duty, period);
> > + duty == 0 ? pwm_disable(lp->pwm) : pwm_enable(lp->pwm);
>
> This is really ugly and should be written explicitly:
>
> if (duty == 0)
> pwm_disable(lp->pwm);
> else
> pwm_enable(lp->pwm);

Oh, I prefer using '?' to if-sentence because it looks clear to me.
But if it's difficult to read/understand, I'll fix it.
I'd like to have others' opinion.

Thank you

Best Regards,
Milo


\
 
 \ /
  Last update: 2012-10-19 11:21    [W:0.177 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site