aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo B. Marliere <[email protected]>2024-02-04 17:20:07 -0300
committerDave Jiang <[email protected]>2024-02-12 15:04:21 -0700
commit1333d6f21d814337a4c73a74edbf0749db43f94a (patch)
treef96b6bc5ccd568564d583c9f9fa39d29b9e08bd1
parente4b0925fcc89c4267b55c25acc254c041f5ccb21 (diff)
nvdimm: make nvdimm_bus_type const
Now that the driver core can properly handle constant struct bus_type, move the nvdimm_bus_type 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 <[email protected]> Suggested-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Ricardo B. Marliere <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dave Jiang <[email protected]>
-rw-r--r--drivers/nvdimm/bus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c
index ef3d0f83318b..508aed017ddc 100644
--- a/drivers/nvdimm/bus.c
+++ b/drivers/nvdimm/bus.c
@@ -271,7 +271,7 @@ EXPORT_SYMBOL_GPL(nvdimm_clear_poison);
static int nvdimm_bus_match(struct device *dev, struct device_driver *drv);
-static struct bus_type nvdimm_bus_type = {
+static const struct bus_type nvdimm_bus_type = {
.name = "nd",
.uevent = nvdimm_bus_uevent,
.match = nvdimm_bus_match,