Skip to content

Commit fc03681

Browse files
committed
nvmem: make nvmem_bus_type constant
Now that the driver core can properly handle constant struct bus_type, move the nvmem_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Srinivas Kandagatla <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 9d9659b commit fc03681

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/nvmem/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ static const struct device_type nvmem_provider_type = {
544544
.release = nvmem_release,
545545
};
546546

547-
static struct bus_type nvmem_bus_type = {
547+
static const struct bus_type nvmem_bus_type = {
548548
.name = "nvmem",
549549
};
550550

0 commit comments

Comments
 (0)