Skip to content

Commit 1333d6f

Browse files
rbmarlieredavejiang
authored andcommitted
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]>
1 parent e4b0925 commit 1333d6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/nvdimm/bus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ EXPORT_SYMBOL_GPL(nvdimm_clear_poison);
271271

272272
static int nvdimm_bus_match(struct device *dev, struct device_driver *drv);
273273

274-
static struct bus_type nvdimm_bus_type = {
274+
static const struct bus_type nvdimm_bus_type = {
275275
.name = "nd",
276276
.uevent = nvdimm_bus_uevent,
277277
.match = nvdimm_bus_match,

0 commit comments

Comments
 (0)