public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bus: ti-sysc: constify the struct device_type usage
@ 2024-02-19 12:10 Ricardo B. Marliere
  2024-02-28  7:31 ` Tony Lindgren
  0 siblings, 1 reply; 2+ messages in thread
From: Ricardo B. Marliere @ 2024-02-19 12:10 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: linux-omap, linux-kernel, Greg Kroah-Hartman, Ricardo B. Marliere

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(-)

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)

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

Best regards,
-- 
Ricardo B. Marliere <ricardo@marliere.net>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-28  7:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-19 12:10 [PATCH] bus: ti-sysc: constify the struct device_type usage Ricardo B. Marliere
2024-02-28  7:31 ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox