summaryrefslogtreecommitdiff
path: root/tools/include
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2026-10-05 13:09:06 -0700
committerLee Jones <lee@kernel.org>2026-10-15 16:52:15 +0100
commit7260db6364a2999f2f85bae8afb6b4d22e41fc8a (patch)
tree2f9642b31d44b20027aaae442f7aa2c488b3b74d /tools/include
parentdc8aec7428160492252267cbc0f78b889f7cae01 (diff)
leds: pca955x: Drop platform data and allocate LEDs with the device
struct pca955x_platform_data has been private to this driver since commit ed1f4b9676a8 ("leds: pca955x: add device tree support"), so nothing can pass it in through dev_get_platdata() and it only serves as an intermediate copy of the per-LED type, default state and fwnode. That copy is a full array of struct pca955x_led, the same runtime structure that struct pca955x already holds, so the data is stored twice. Remove the platform data and parse the child firmware nodes directly into pca955x->leds[]. Make leds[] a flexible array member so it is allocated together with struct pca955x. This removes three allocations and the num_leds sanity check, which could no longer fail. struct pca955x_led moves above struct pca955x, as a flexible array member needs the complete element type. Assisted-by: LLM Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://patch.msgid.link/20261005200906.188636-1-rosenp@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'tools/include')
0 files changed, 0 insertions, 0 deletions