Commit d1278c91 authored by Ricardo B. Marliere's avatar Ricardo B. Marliere Committed by Dmitry Torokhov

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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarRicardo B. Marliere <ricardo@marliere.net>
Link: https://lore.kernel.org/r/20240210-bus_cleanup-input2-v1-1-0daef7e034e0@marliere.netSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent d49193be
......@@ -344,7 +344,7 @@ static int rmi_bus_match(struct device *dev, struct device_driver *drv)
return physical || rmi_function_match(dev, drv);
}
struct bus_type rmi_bus_type = {
const struct bus_type rmi_bus_type = {
.match = rmi_bus_match,
.name = "rmi4",
};
......
......@@ -185,7 +185,7 @@ static inline int rmi_write_block(struct rmi_device *d, u16 addr,
int rmi_for_each_dev(void *data, int (*func)(struct device *dev, void *data));
extern struct bus_type rmi_bus_type;
extern const struct bus_type rmi_bus_type;
int rmi_of_property_read_u32(struct device *dev, u32 *result,
const char *prop, bool optional);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment