Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ipack: make ipack_bus_type const

Now that the driver core can properly handle constant struct bus_type,
move the ipack_bus_type variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: "Ricardo B. Marliere" <ricardo@marliere.net>
Acked-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
Link: https://lore.kernel.org/r/20240204-bus_cleanup-ipack-v1-1-aef5e8f84d01@marliere.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Ricardo B. Marliere and committed by
Greg Kroah-Hartman
c65f52fc 408b18b1

+1 -1
+1 -1
drivers/ipack/ipack.c
··· 187 187 }; 188 188 ATTRIBUTE_GROUPS(ipack); 189 189 190 - static struct bus_type ipack_bus_type = { 190 + static const struct bus_type ipack_bus_type = { 191 191 .name = "ipack", 192 192 .probe = ipack_bus_probe, 193 193 .match = ipack_bus_match,