Hi!

> >+struct ncp5623_led {
> >+    bool active;
> >+    unsigned int led_no;
> >+    struct led_classdev ldev;
> >+    struct work_struct work;
> >+    struct ncp5623_priv *priv;
> >+};
> >+
> >+struct ncp5623_priv {
> >+    struct ncp5623_led leds[NCP5623_MAX_LEDS];
> 
> Please allocate memory dynamically, depending on the number
> of LEDs defined in a Device Tree.

MAX_LEDs is three. Are you sure overhead of dynamic allocation is
worth it?

And if this is for RGB leds... very probably device will want to use
all 3 channels.

Best regards,
                                                                Pavel
                                                                
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Reply via email to