diff options
author | Ricardo B. Marliere <[email protected]> | 2024-02-04 17:10:32 -0300 |
---|---|---|
committer | Lee Jones <[email protected]> | 2024-02-23 14:58:03 +0000 |
commit | 6abc896ccbdd8cd4353adc1a27a469753e78ce0d (patch) | |
tree | 7994335b31bbd7b7f6c37b4091bee73667e365eb | |
parent | c28c45608ef35bea99a959c1643fad32e2cc4044 (diff) |
mfd: mcp-core: Make mcp_bus_type const
Now that the driver core can properly handle constant struct bus_type,
move the mcp_bus_type variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.
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: Lee Jones <[email protected]>
-rw-r--r-- | drivers/mfd/mcp-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/mcp-core.c b/drivers/mfd/mcp-core.c index 2fa592c37c6f..16ca23311cab 100644 --- a/drivers/mfd/mcp-core.c +++ b/drivers/mfd/mcp-core.c @@ -41,7 +41,7 @@ static void mcp_bus_remove(struct device *dev) drv->remove(mcp); } -static struct bus_type mcp_bus_type = { +static const struct bus_type mcp_bus_type = { .name = "mcp", .match = mcp_bus_match, .probe = mcp_bus_probe, |