diff options
| author | Ricardo B. Marliere <[email protected]> | 2024-03-05 18:22:28 +0000 |
|---|---|---|
| committer | Alexandre Belloni <[email protected]> | 2024-03-08 11:05:10 +0000 |
| commit | 6b6ca096115e5b7a85e8313f4e68a72d52db91b3 (patch) | |
| tree | 09390476f578e91e4b2e4a33a5277fde7eb8f22f /drivers/rtc/interface.c | |
| parent | dt-bindings: rtc: abx80x: Improve checks on trickle charger constraints (diff) | |
| download | kernel-6b6ca096115e5b7a85e8313f4e68a72d52db91b3.tar.gz kernel-6b6ca096115e5b7a85e8313f4e68a72d52db91b3.zip | |
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 <[email protected]>
Suggested-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Ricardo B. Marliere <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexandre Belloni <[email protected]>
Diffstat (limited to 'drivers/rtc/interface.c')
| -rw-r--r-- | drivers/rtc/interface.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index 1b63111cdda2..5faafb4aa55c 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c @@ -696,7 +696,7 @@ struct rtc_device *rtc_class_open(const char *name) struct device *dev; struct rtc_device *rtc = NULL; - dev = class_find_device_by_name(rtc_class, name); + dev = class_find_device_by_name(&rtc_class, name); if (dev) rtc = to_rtc_device(dev); |
