diff mbox series

bus: ti-sysc: constify the struct device_type usage

Message ID 20240219-device_cleanup-ti-sysc-v1-1-13b53177d0a5@marliere.net (mailing list archive)
State New, archived
Headers show
Series bus: ti-sysc: constify the struct device_type usage | expand

Commit Message

Ricardo B. Marliere Feb. 19, 2024, 12:10 p.m. UTC
Since commit aed65af1cc2f ("drivers: make device_type const"), the driver
core can properly handle constant struct device_type. Move the
sysc_device_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 <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
---
 drivers/bus/ti-sysc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


---
base-commit: 0012c1958460386adc5770baf2f53206aed77ff3
change-id: 20240219-device_cleanup-ti-sysc-aadfa0ba7b30

Best regards,

Comments

Tony Lindgren Feb. 28, 2024, 7:31 a.m. UTC | #1
* Ricardo B. Marliere <ricardo@marliere.net> [240219 14:09]:
> Since commit aed65af1cc2f ("drivers: make device_type const"), the driver
> core can properly handle constant struct device_type. Move the
> sysc_device_type variable to be a constant structure as well, placing it
> into read-only memory which can not be modified at runtime.

Thanks applying into omap-for-v6.9/ti-sysc.

Tony
diff mbox series

Patch

diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index 245e5e827d0d..41d33f39efe5 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -2400,7 +2400,7 @@  static int sysc_child_add_clocks(struct sysc *ddata,
 	return 0;
 }
 
-static struct device_type sysc_device_type = {
+static const struct device_type sysc_device_type = {
 };
 
 static struct sysc *sysc_child_to_parent(struct device *dev)