pwm: lpc18xx-sct: Reduce number of devm memory allocations
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 10 Nov 2021 08:49:49 +0000 (09:49 +0100)
committerThierry Reding <thierry.reding@gmail.com>
Wed, 2 Feb 2022 16:04:23 +0000 (17:04 +0100)
commit20d9de9c4d6642bb40c935233697723b56573cbc
tree0a51ef54c9dc4f8f0fd9e2eecfadac3d38f36397
parent0401f24cd238ae200a23a13925f98de3d2c883b8
pwm: lpc18xx-sct: Reduce number of devm memory allocations

Each devm allocations has an overhead of 24 bytes to store the related
struct devres_node additionally to the fragmentation of the allocator.
So allocating 16 struct lpc18xx_pwm_data (which only hold a single int)
adds quite some overhead. Instead put the per-channel data into the
driver data struct and allocate it in one go.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-lpc18xx-sct.c