linux/drivers/gpu/host1x
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
..
hw gpu: host1x: Syncpoint interrupt sharding 2023-10-11 22:52:44 +02:00
bus.c driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
bus.h gpu: host1x: bus: make host1x_bus_type const 2024-02-13 19:10:57 +01:00
cdma.c gpu: host1x: remove redundant assignment to variable space 2024-02-16 11:51:46 +01:00
cdma.h gpu: host1x: Implement job tracking using DMA fences 2023-01-26 15:55:38 +01:00
channel.c gpu: host1x: Stop CDMA before suspending 2023-10-11 22:52:44 +02:00
channel.h gpu: host1x: Stop CDMA before suspending 2023-10-11 22:52:44 +02:00
context_bus.c gpu: host1x: Register context bus unconditionally 2022-07-08 16:31:24 +02:00
context.c gpu: host1x: Correct allocated size for contexts 2023-10-11 22:52:44 +02:00
context.h gpu: host1x: Add context device management code 2022-07-08 16:27:52 +02:00
debug.c gpu: host1x: Rewrite syncpoint interrupt handling 2023-01-26 15:55:38 +01:00
debug.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201 2019-05-30 11:29:52 -07:00
dev.c gpu: host1x: Convert to platform remove callback returning void 2024-05-27 10:13:55 +02:00
dev.h gpu: host1x: Skip reset assert on Tegra186 2024-02-22 18:48:06 +01:00
fence.c gpu: host1x: External timeout/cancellation for fences 2023-01-26 15:55:38 +01:00
fence.h gpu: host1x: External timeout/cancellation for fences 2023-01-26 15:55:38 +01:00
intr.c gpu: host1x: Rewrite syncpoint interrupt handling 2023-01-26 15:55:38 +01:00
intr.h gpu: host1x: Rewrite syncpoint interrupt handling 2023-01-26 15:55:38 +01:00
job.c gpu: host1x: Implement job tracking using DMA fences 2023-01-26 15:55:38 +01:00
job.h drm/tegra: Implement correct DMA-BUF semantics 2021-12-16 14:07:06 +01:00
Kconfig drm/tegra: Allow compile test on !ARM v2 2023-04-04 18:04:43 +02:00
Makefile gpu: host1x: Tegra234 device data and headers 2022-07-08 16:27:52 +02:00
mipi.c gpu: host1x: mipi: Benefit from devm_clk_get_prepared() 2024-05-27 10:13:55 +02:00
syncpt.c gpu: host1x: Don't rely on dma_fence_wait_timeout return value 2023-04-04 14:24:24 +02:00
syncpt.h gpu: host1x: Rewrite syncpoint interrupt handling 2023-01-26 15:55:38 +01:00