Re: [PATCH 2/2] leds: Add driver for NCP5623 3-channel I2C LED driver
From: Pavel Machek <hidden>
Date: 2016-06-26 21:49:07
Also in:
linux-leds, lkml
From: Pavel Machek <hidden>
Date: 2016-06-26 21:49:07
Also in:
linux-leds, lkml
Hi!
quoted
+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