linux/drivers/input/rmi4
Greg Kroah-Hartman d69d804845 driver core: have match() callback in struct bus_type take a const *
In the match() callback, the struct device_driver * should not be
changed, so change the function callback to be a const *.  This is one
step of many towards making the driver core safe to have struct
device_driver in read-only memory.

Because the match() callback is in all busses, all busses are modified
to handle this properly.  This does entail switching some container_of()
calls to container_of_const() to properly handle the constant *.

For some busses, like PCI and USB and HV, the const * is cast away in
the match callback as those busses do want to modify those structures at
this point in time (they have a local lock in the driver structure.)
That will have to be changed in the future if they wish to have their
struct device * in read-only-memory.

Cc: Rafael J. Wysocki <rafael@kernel.org>
Reviewed-by: Alex Elder <elder@kernel.org>
Acked-by: Sumit Garg <sumit.garg@linaro.org>
Link: https://lore.kernel.org/r/2024070136-wrongdoer-busily-01e8@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-03 15:16:54 +02:00
..
Kconfig media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
Makefile Input: synaptics-rmi4 - add support for F3A 2020-10-04 19:51:44 -07:00
rmi_2d_sensor.c Input: synaptics-rmi4 - remove the exporting of rmi_2d_sensor_set_input_params 2019-07-24 12:58:11 +03:00
rmi_2d_sensor.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
rmi_bus.c driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
rmi_bus.h driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
rmi_driver.c driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
rmi_driver.h driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
rmi_f3a.c Input: synaptics-rmi4 - add support for F3A 2020-10-04 19:51:44 -07:00
rmi_f01.c Input: synaptics-rmi4 - use sysfs_emit() to instead of scnprintf() 2023-12-13 21:26:12 -08:00
rmi_f03.c Input: move from strlcpy with unused retval to strscpy 2022-08-18 15:44:08 -07:00
rmi_f11.c Input: synaptics-rmi4 - fix kerneldoc warnings 2020-11-09 16:45:50 -08:00
rmi_f12.c Input: synaptics-rmi4 - do not consume more data than we have (F11, F12) 2019-11-04 16:11:50 -08:00
rmi_f30.c Input: synaptics-rmi4 - rename f30_data to gpio_data 2020-10-04 19:51:43 -07:00
rmi_f34.c Input: synaptics-rmi4 - replace deprecated strncpy 2023-09-30 09:24:15 -07:00
rmi_f34.h Input: synaptics-rmi4 - remove unneeded struct register_offset 2022-09-23 13:00:13 -07:00
rmi_f34v7.c Input: synaptics-rmi4 - drop useless gotos in rmi_f34v7_do_reflash() 2022-09-23 13:00:14 -07:00
rmi_f54.c Input: move from strlcpy with unused retval to strscpy 2022-08-18 15:44:08 -07:00
rmi_f55.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
rmi_i2c.c Input: drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-13 15:43:19 -07:00
rmi_smbus.c Merge branch 'next' into for-linus 2024-05-22 17:39:34 -07:00
rmi_spi.c Input: synaptics-rmi4 - follow renaming of SPI "master" to "controller" 2024-02-08 11:54:39 +00:00