]> www.infradead.org Git - users/dwmw2/linux.git/commit
rtc: sd3078: drop needless struct sd3078
authorAndré Draszik <andre.draszik@linaro.org>
Tue, 4 Mar 2025 17:05:42 +0000 (17:05 +0000)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 5 Mar 2025 22:08:01 +0000 (23:08 +0100)
commit6158c6b82444e628fdbde9ae6b76872e7ac4e7f5
tree0ad60986ab3610a5eed1bb2cb998979c7220464c
parentd94bc2bbf8d9c1319c64467cc5bf94ecb5388cfa
rtc: sd3078: drop needless struct sd3078

The memory pointed to by the ::rtc member is managed via devres, and
no code in this driver uses it past _probe().

We can drop it from the structure and just use a local temporary
variable, reducing runtime memory consumption by a few bytes.

Since this now means that the structure has just one member only left,
there  is no need anymore to allocate data for it and pass that around
via the various callbacks, just to extract that one member.

Instead, we can just pass that one member and avoid the extra memory
allocation for the containing struct, reducing runtime memory
consumption.

Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20250304-rtc-cleanups-v2-14-d4689a71668c@linaro.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-sd3078.c