diff options
author | Ricardo B. Marliere <ricardo@marliere.net> | 2024-02-19 13:40:50 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-03-06 15:13:10 +0100 |
commit | e869b72b33731063b50433eb6146d51a479995a1 (patch) | |
tree | 5ea50d5c6a7c8e310c9aa1e5cfd964fa64cb1a30 /drivers/greybus/bundle.c | |
parent | greybus: make greybus_bus_type const (diff) | |
download | linux-e869b72b33731063b50433eb6146d51a479995a1.tar.xz linux-e869b72b33731063b50433eb6146d51a479995a1.zip |
greybus: constify the struct device_type usage
Since commit aed65af1cc2f ("drivers: make device_type const"), the driver
core can properly handle constant struct device_type. Move the
greybus_hd_type, greybus_module_type, greybus_interface_type,
greybus_control_type, greybus_bundle_type and greybus_svc_type variables to
be constant structures as well, placing it into read-only memory which can
not be modified at runtime.
Signed-off-by: "Ricardo B. Marliere" <ricardo@marliere.net>
Reviewed-by: Alex Elder <elder@linaro.org>
Link: https://lore.kernel.org/r/20240219-device_cleanup-greybus-v1-1-babb3f65e8cc@marliere.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/greybus/bundle.c')
-rw-r--r-- | drivers/greybus/bundle.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/greybus/bundle.c b/drivers/greybus/bundle.c index 84660729538b..a6e1cca06172 100644 --- a/drivers/greybus/bundle.c +++ b/drivers/greybus/bundle.c @@ -166,7 +166,7 @@ static const struct dev_pm_ops gb_bundle_pm_ops = { SET_RUNTIME_PM_OPS(gb_bundle_suspend, gb_bundle_resume, gb_bundle_idle) }; -struct device_type greybus_bundle_type = { +const struct device_type greybus_bundle_type = { .name = "greybus_bundle", .release = gb_bundle_release, .pm = &gb_bundle_pm_ops, |