diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2024-03-15 15:04:04 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2024-03-15 15:04:04 -0700 |
commit | 57ed9567e63b59350c21ae026635ae051e247abb (patch) | |
tree | c627d8817df7917f6648c23592ebba438e3273fe /drivers/input/rmi4 | |
parent | fbf8d71742557abaf558d8efb96742d442720cc2 (diff) | |
parent | 81c32343d04f8ca974681d5fb5d939d2e1f58851 (diff) | |
download | lwn-57ed9567e63b59350c21ae026635ae051e247abb.tar.gz lwn-57ed9567e63b59350c21ae026635ae051e247abb.zip |
Merge branch 'next' into for-linus
Prepare input updates for 6.9 merge window.
Diffstat (limited to 'drivers/input/rmi4')
-rw-r--r-- | drivers/input/rmi4/rmi_bus.c | 2 | ||||
-rw-r--r-- | drivers/input/rmi4/rmi_bus.h | 2 | ||||
-rw-r--r-- | drivers/input/rmi4/rmi_driver.c | 6 |
3 files changed, 7 insertions, 3 deletions
diff --git a/drivers/input/rmi4/rmi_bus.c b/drivers/input/rmi4/rmi_bus.c index 1b45b1d3077d..343030290d78 100644 --- a/drivers/input/rmi4/rmi_bus.c +++ b/drivers/input/rmi4/rmi_bus.c @@ -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", }; diff --git a/drivers/input/rmi4/rmi_bus.h b/drivers/input/rmi4/rmi_bus.h index 25df6320f9f1..ea46ad9447ec 100644 --- a/drivers/input/rmi4/rmi_bus.h +++ b/drivers/input/rmi4/rmi_bus.h @@ -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); diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c index 42eaebb3bf5c..ef9ea295f9e0 100644 --- a/drivers/input/rmi4/rmi_driver.c +++ b/drivers/input/rmi4/rmi_driver.c @@ -1196,7 +1196,11 @@ static int rmi_driver_probe(struct device *dev) } rmi_driver_set_input_params(rmi_dev, data->input); data->input->phys = devm_kasprintf(dev, GFP_KERNEL, - "%s/input0", dev_name(dev)); + "%s/input0", dev_name(dev)); + if (!data->input->phys) { + retval = -ENOMEM; + goto err; + } } retval = rmi_init_functions(data); |