driver core: make kobj_type structures constant
authorThomas Weißschuh <linux@weissschuh.net>
Sat, 4 Feb 2023 22:36:58 +0000 (22:36 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Feb 2023 12:34:30 +0000 (13:34 +0100)
commitc83d9ab42f1ef70d81bb3c637a12c098a9a05057
tree501a3f7ca5f3a66ac4c16a617035941e118d84af
parentdda6b81f17ad8e72f8bc151c876cd335a471e268
driver core: make kobj_type structures constant

Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.")
the driver core allows the usage of const struct kobj_type.

Take advantage of this to constify the structure definitions to prevent
modification at runtime.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20230204-kobj_type-driver-core-v1-1-b9f809419f2c@weissschuh.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/bus.c
drivers/base/class.c
drivers/base/core.c
drivers/base/swnode.c