moxtet: mark moxtet_bus_type as const
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Dec 2023 14:26:39 +0000 (15:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Jan 2024 16:01:14 +0000 (17:01 +0100)
Now that the driver core can properly handle constant struct bus_type,
move the moxtet_bus_type to be a constant structure as well, placing it
into read-only memory which can not be modified at runtime.

Cc: Marek BehĂșn <kabel@kernel.org>
Link: https://lore.kernel.org/r/2023121939-written-guru-db83@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/bus/moxtet.c

index 5eb0fe73ddc45b2c092877cb002c605dbbf6e043..5e71b4c29992dc3864ad5d78763545d245f8529d 100644 (file)
@@ -102,7 +102,7 @@ static int moxtet_match(struct device *dev, struct device_driver *drv)
        return 0;
 }
 
-static struct bus_type moxtet_bus_type = {
+static const struct bus_type moxtet_bus_type = {
        .name           = "moxtet",
        .dev_groups     = moxtet_dev_groups,
        .match          = moxtet_match,