]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
bus: ti-sysc: constify the struct device_type usage
authorRicardo B. Marliere <ricardo@marliere.net>
Mon, 19 Feb 2024 12:10:00 +0000 (09:10 -0300)
committerTony Lindgren <tony@atomide.com>
Wed, 28 Feb 2024 07:30:25 +0000 (09:30 +0200)
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>
Message-ID: <20240219-device_cleanup-ti-sysc-v1-1-13b53177d0a5@marliere.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/bus/ti-sysc.c

index 245e5e827d0dcfe3b011b7d3d003add057b43c28..41d33f39efe52a55347b8203bacfd618f849ebc4 100644 (file)
@@ -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)