Skip to content

Commit b928d35

Browse files
rbmarlieregregkh
authored andcommitted
spmi: make spmi_bus_type const
Now that the driver core can properly handle constant struct bus_type, move the spmi_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> Link: https://lore.kernel.org/r/20240204-bus_cleanup-spmi-v1-1-ef7f278f1987@marliere.net Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org> Link: https://lore.kernel.org/r/20240507210809.3479953-2-sboyd@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 336d8cd commit b928d35

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/spmi/spmi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ static int spmi_drv_uevent(const struct device *dev, struct kobj_uevent_env *env
378378
return 0;
379379
}
380380

381-
static struct bus_type spmi_bus_type = {
381+
static const struct bus_type spmi_bus_type = {
382382
.name = "spmi",
383383
.match = spmi_device_match,
384384
.probe = spmi_drv_probe,

0 commit comments

Comments
 (0)