]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
s390/time: make stp_subsys const
authorRicardo B. Marliere <ricardo@marliere.net>
Sun, 4 Feb 2024 14:25:45 +0000 (11:25 -0300)
committerHeiko Carstens <hca@linux.ibm.com>
Fri, 9 Feb 2024 12:58:15 +0000 (13:58 +0100)
Now that the driver core can properly handle constant struct bus_type,
move the stp_subsys variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: "Ricardo B. Marliere" <ricardo@marliere.net>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20240204-bus_cleanup-s390_time-v1-1-d2120156982a@marliere.net
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/kernel/time.c

index 8357306fb76e7d720a4b28055156e8dd1367aecc..fb9f31f36628137ba7d3636606c44d54d3cb984a 100644 (file)
@@ -716,7 +716,7 @@ out_unlock:
 /*
  * STP subsys sysfs interface functions
  */
-static struct bus_type stp_subsys = {
+static const struct bus_type stp_subsys = {
        .name           = "stp",
        .dev_name       = "stp",
 };