linux-stable/drivers/soundwire
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
..
amd_init.c soundwire: amd: use inline function for register update 2024-03-28 23:39:50 +05:30
amd_init.h soundwire: amd: use inline function for register update 2024-03-28 23:39:50 +05:30
amd_manager.c soundwire updates for 6.10 2024-05-21 11:23:36 -07:00
amd_manager.h soundwire: amd: fix for wake interrupt handling for clockstop mode 2024-03-28 23:40:33 +05:30
bus_type.c driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
bus.c soundwire: bus: extend base clock checks to 96 MHz 2024-04-05 17:21:03 +05:30
bus.h soundwire: export sdw_compute_slave_ports() function 2023-04-12 15:30:35 +05:30
cadence_master.c soundwire: cadence: show the bus frequency and frame shape 2024-04-05 17:21:02 +05:30
cadence_master.h soundwire: intel/cadence: update hardware reset sequence 2023-05-29 10:49:47 +05:30
debugfs.c soundwire: bus: introduce controller_id 2023-11-24 12:24:37 +05:30
dmi-quirks.c ASoC: Intel: common: DMI remap for rebranded Intel NUC M15 (LAPRC710) laptops 2024-02-08 21:23:19 +00:00
generic_bandwidth_allocation.c soundwire: generic_bandwidth_allocation use bus->params.max_dr_freq 2023-11-28 15:29:55 +05:30
intel_ace2x_debugfs.c soundwire: intel_ace2x: add debugfs support 2023-05-27 16:06:45 +05:30
intel_ace2x.c soundwire: intel_ace2.x: add support for DOAISE property 2024-05-04 18:26:50 +05:30
intel_auxdevice.c soundwire: intel_ace2.x: add support for DOAISE property 2024-05-04 18:26:50 +05:30
intel_auxdevice.h soundwire: intel: export intel_resume_child_device 2024-04-11 22:52:51 +05:30
intel_bus_common.c soundwire: intel/cadence: update hardware reset sequence 2023-05-29 10:49:47 +05:30
intel_init.c soundwire: intel_init: resume all devices on exit. 2024-04-11 22:52:51 +05:30
intel.c soundwire: intel: add support for MeteorLake additional clocks 2024-04-05 17:21:03 +05:30
intel.h soundwire: intel_ace2.x: add support for DOAISE property 2024-05-04 18:26:50 +05:30
irq.c soundwire: bus: Make IRQ handling conditionally built 2023-09-21 11:31:33 +02:00
irq.h soundwire: bus: Make IRQ handling conditionally built 2023-09-21 11:31:33 +02:00
Kconfig soundwire: intel_ace2x: fix SND_SOC_SOF_HDA_MLINK dependency 2023-06-21 16:19:44 +05:30
Makefile soundwire: amd: refactor amd soundwire manager device node creation 2024-01-30 16:06:34 +00:00
master.c soundwire: constify the struct device_type usage 2024-03-03 19:28:06 +05:30
mipi_disco.c soundwire: fix port_ready[] dynamic allocation in mipi_disco 2020-09-03 16:02:29 +05:30
qcom.c soundwire: qcom: allow multi-link on newer devices 2024-04-11 19:27:17 +05:30
slave.c soundwire: constify the struct device_type usage 2024-03-03 19:28:06 +05:30
stream.c soundwire: Use snd_soc_substream_to_rtd() to obtain rtd 2024-03-03 19:29:28 +05:30
sysfs_local.h soundwire: sysfs: remove sdw_slave_sysfs_init() 2024-03-28 23:38:47 +05:30
sysfs_slave_dpn.c soundwire: sysfs: remove sdw_slave_sysfs_init() 2024-03-28 23:38:47 +05:30
sysfs_slave.c soundwire: sysfs: remove unneeded ATTRIBUTE_GROUPS() comments 2024-03-28 23:38:47 +05:30