summaryrefslogtreecommitdiff
path: root/include/linux/greybus.h
diff options
context:
space:
mode:
authorRicardo B. Marliere <ricardo@marliere.net>2024-02-19 09:40:50 -0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-03-06 14:13:10 +0000
commite869b72b33731063b50433eb6146d51a479995a1 (patch)
tree5ea50d5c6a7c8e310c9aa1e5cfd964fa64cb1a30 /include/linux/greybus.h
parent00b9850e7307ff690639dd0584a50dd8a72d3548 (diff)
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 'include/linux/greybus.h')
-rw-r--r--include/linux/greybus.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/greybus.h b/include/linux/greybus.h
index 92da9ec4f5f0..2cc570ea63bf 100644
--- a/include/linux/greybus.h
+++ b/include/linux/greybus.h
@@ -106,12 +106,12 @@ struct dentry *gb_debugfs_get(void);
extern const struct bus_type greybus_bus_type;
-extern struct device_type greybus_hd_type;
-extern struct device_type greybus_module_type;
-extern struct device_type greybus_interface_type;
-extern struct device_type greybus_control_type;
-extern struct device_type greybus_bundle_type;
-extern struct device_type greybus_svc_type;
+extern const struct device_type greybus_hd_type;
+extern const struct device_type greybus_module_type;
+extern const struct device_type greybus_interface_type;
+extern const struct device_type greybus_control_type;
+extern const struct device_type greybus_bundle_type;
+extern const struct device_type greybus_svc_type;
static inline int is_gb_host_device(const struct device *dev)
{