diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-07-12 19:19:01 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-07-16 14:30:05 +0200 |
| commit | fc0368121686065287a24b6bf7deda20a9fafcd7 (patch) | |
| tree | 1d3a36ea1fefa0532737353629e638821994e616 | |
| parent | 9d9659b054c8ff888c33e3efcbf09db4c4ab9dc6 (diff) | |
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 <srini@kernel.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Srinivas Kandagatla <srini@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20250712181905.6738-6-srini@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/nvmem/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index 880572ba515a..817f55f3a19e 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -544,7 +544,7 @@ static const struct device_type nvmem_provider_type = { .release = nvmem_release, }; -static struct bus_type nvmem_bus_type = { +static const struct bus_type nvmem_bus_type = { .name = "nvmem", }; |
