nvdimm: make nvdimm_bus_type const
authorRicardo B. Marliere <ricardo@marliere.net>
Sun, 4 Feb 2024 20:20:07 +0000 (17:20 -0300)
committerDave Jiang <dave.jiang@intel.com>
Mon, 12 Feb 2024 22:04:21 +0000 (15:04 -0700)
commit1333d6f21d814337a4c73a74edbf0749db43f94a
treef96b6bc5ccd568564d583c9f9fa39d29b9e08bd1
parente4b0925fcc89c4267b55c25acc254c041f5ccb21
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 <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-nvdimm-v1-1-77ae19fa3e3b@marliere.net
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/nvdimm/bus.c