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

Configure Feed

Select the types of activity you want to include in your feed.

Input: synaptics-rmi4 - make rmi_bus_type const

Now that the driver core can properly handle constant struct bus_type,
move the variable rmi_bus_type 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>
Link: https://lore.kernel.org/r/20240210-bus_cleanup-input2-v1-1-0daef7e034e0@marliere.net
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Ricardo B. Marliere and committed by
Dmitry Torokhov
d1278c91 d49193be

+2 -2
+1 -1
drivers/input/rmi4/rmi_bus.c
··· 344 344 return physical || rmi_function_match(dev, drv); 345 345 } 346 346 347 - struct bus_type rmi_bus_type = { 347 + const struct bus_type rmi_bus_type = { 348 348 .match = rmi_bus_match, 349 349 .name = "rmi4", 350 350 };
+1 -1
drivers/input/rmi4/rmi_bus.h
··· 185 185 186 186 int rmi_for_each_dev(void *data, int (*func)(struct device *dev, void *data)); 187 187 188 - extern struct bus_type rmi_bus_type; 188 + extern const struct bus_type rmi_bus_type; 189 189 190 190 int rmi_of_property_read_u32(struct device *dev, u32 *result, 191 191 const char *prop, bool optional);