rtc: class: make rtc_class constant
authorRicardo B. Marliere <ricardo@marliere.net>
Tue, 5 Mar 2024 18:22:28 +0000 (15:22 -0300)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Fri, 8 Mar 2024 11:05:10 +0000 (12:05 +0100)
commit6b6ca096115e5b7a85e8313f4e68a72d52db91b3
tree09390476f578e91e4b2e4a33a5277fde7eb8f22f
parent32a6be0858356190ac3bce4b75693549e1da2f16
rtc: class: make rtc_class constant

Since commit 43a7206b0963 ("driver core: class: make class_register() take
a const *"), the driver core allows for struct class to be in read-only
memory, so move the rtc_class structure to be declared at build time
placing it into read-only memory, instead of having to be dynamically
allocated at boot time.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Link: https://lore.kernel.org/r/20240305-class_cleanup-abelloni-v1-1-944c026137c8@marliere.net
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/class.c
drivers/rtc/interface.c
include/linux/rtc.h
kernel/power/suspend_test.c
kernel/time/alarmtimer.c