[LEDE-DEV] [PATCH ver. B] ramips: unify etc/board.d/01_leds configuration

p.wassi at gmx.at p.wassi at gmx.at
Tue Jul 26 10:23:39 PDT 2016


> > What about this approach:
> > without changing every call to set_usb_led(), we leave set_usb_led() in place,
> > don't use a hardcoded triggering device there, but instead have a second
> > parameter, with a default value.
> > Something like ${2:-wlan0} ?
> 
> yes, that sound like a good plan.
> 

I've just sent in that patch. However, let me discuss this a bit further.
What's the purpose of those set_usb_led and set_wifi_led functions?
To simplify calls to ucidef_set_led_... functions.

Wouldn't it be better to simplify the ucidef_set_led functions themselves
(using default values as parameters like here), or otherwise have some
helper functions like set_usb_led and set_wifi_led but not keeping them
seperate per target platform, instead having them available globally?

Best regards,
P. Wassi



More information about the Lede-dev mailing list