diff options
| author | Ricardo B. Marliere <[email protected]> | 2024-02-19 12:40:50 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2024-03-06 14:13:10 +0000 |
| commit | e869b72b33731063b50433eb6146d51a479995a1 (patch) | |
| tree | 5ea50d5c6a7c8e310c9aa1e5cfd964fa64cb1a30 /drivers/greybus/interface.c | |
| parent | greybus: make greybus_bus_type const (diff) | |
| download | kernel-e869b72b33731063b50433eb6146d51a479995a1.tar.gz kernel-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" <[email protected]>
Reviewed-by: Alex Elder <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/greybus/interface.c')
| -rw-r--r-- | drivers/greybus/interface.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/greybus/interface.c b/drivers/greybus/interface.c index 9ec949a438ef..a88dc701289c 100644 --- a/drivers/greybus/interface.c +++ b/drivers/greybus/interface.c @@ -765,7 +765,7 @@ static const struct dev_pm_ops gb_interface_pm_ops = { gb_interface_runtime_idle) }; -struct device_type greybus_interface_type = { +const struct device_type greybus_interface_type = { .name = "greybus_interface", .release = gb_interface_release, .pm = &gb_interface_pm_ops, |
