lkml.org 
[lkml]   [2013]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 2/3] leds: add LED Trigger for camera function
Date
> -----Original Message-----
> From: Bryan Wu [mailto:cooloney@gmail.com]
> Sent: Thursday, March 14, 2013 8:19 AM
> To: Kim, Milo
> Cc: linux-leds@vger.kernel.org; linux-kernel@vger.kernel.org; Jeong,
> Daniel
> Subject: Re: [PATCH 2/3] leds: add LED Trigger for camera function
>
> On Wed, Mar 13, 2013 at 4:16 PM, Kim, Milo <Milo.Kim@ti.com> wrote:
> >> > +#if defined(CONFIG_LEDS_TRIGGER_CAMERA) ||
> >> defined(CONFIG_LEDS_TRIGGER_CAMERA_MODULE)
> >> > +extern void ledtrig_flash_ctrl(bool on);
> >> > +extern void ledtrig_torch_ctrl(bool on);
> >> > +#else
> >> > +#define ledtrig_flash_ctrl(x) do {} while(0)
> >> > +#define ledtrig_torch_ctrl(x) do {} while(0)
> >>
> >> It's better don't use #define macros but use real empty functions
> like
> >> this:
> >> static inline void ledtrig_flash_ctrl(bool on)
> >> {
> >> return;
> >> }
> >
> > I agree, but other trigger functions are declared as do-while
> definition.
> > So I would let them unify if it's not critical.
> > I'd like to have your opinion, which is better.
> >
> > Thanks,
> > Milo
>
> I did same thing before, Andrew Morton corrected me like this. Please
> feel free to submit patch to move other macros to empty functions.
>
> Thanks,
> -Bryan

OK, it's clear now. I'll send the patch-set with previous one,
'[PATCH 3/3] leds: lm355x, lm3642: support Camera LED triggers for flash/torch'.

Thanks!
-Milo



\
 
 \ /
  Last update: 2013-03-14 01:01    [W:0.110 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site