RE: [PATCH 2/3] leds: add LED Trigger for camera function

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

 



> > +#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
--
To unsubscribe from this list: send the line "unsubscribe linux-leds" 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 Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux