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 <[email protected]> Suggested-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: "Ricardo B. Marliere" <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 336d8cd commit b928d35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)