]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb4a7c66384a88f75f58e39f64a620e1fa4ff7c69
tree0a51ef54c9dc4f8f0fd9e2eecfadac3d38f36397
parentc9682b5924bf038a465df3d7eb5a85b8e5d98927
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