rtc: rx8581: drop needless struct rx8581
authorAndré Draszik <andre.draszik@linaro.org>
Tue, 4 Mar 2025 17:05:39 +0000 (17:05 +0000)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 5 Mar 2025 22:08:01 +0000 (23:08 +0100)
commit3b87c6872aed6a7f4112ed6f6078e43035ce0026
tree2a1020a5d8062e6f896d3e355f8d2e941467bc09
parent3d5d0fe1cb82eea1831d33a8db08b142d208d7fe
rtc: rx8581: drop needless struct rx8581

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-11-d4689a71668c@linaro.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-rx8581.c