[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <A874F61F95741C4A9BA573A70FE3998F641791BB@DQHE02.ent.ti.com>
Date: Fri, 19 Oct 2012 08:45:14 +0000
From: "Kim, Milo" <Milo.Kim@...com>
To: Thierry Reding <thierry.reding@...onic-design.de>
CC: Andrew Morton <akpm@...ux-foundation.org>,
Richard Purdie <rpurdie@...ys.net>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 1/2] lp855x_bl: use generic PWM functions
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists