linux/arch/powerpc/platforms/ps3
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
..
device-init.c powerpc: Fix PS3 allmodconfig warning 2024-04-03 21:44:50 +11:00
exports.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167 2019-05-30 11:26:39 -07:00
gelic_udbg.c powerpc/ps3: move udbg_shutdown_ps3gelic prototype 2023-11-21 12:06:50 +11:00
htab.c powerpc/ps3: Change updateboltedpp() panic to info 2023-02-12 22:11:35 +11:00
hvcall.S powerpc/ps3: Make real stack frames for LV1 hcalls 2024-02-21 23:14:52 +11:00
interrupt.c powerpc: Convert irq_domain_add_legacy_isa use to irq_domain_add_legacy 2021-06-10 13:09:16 +01:00
Kconfig drivers/ps3: select VIDEO to provide cmdline functions 2024-02-09 21:22:02 +01:00
Makefile powerpc/ps3: move udbg_shutdown_ps3gelic prototype 2023-11-21 12:06:50 +11:00
mm.c powerpc: Remove asm/prom.h from all files that don't need it 2022-05-08 22:15:04 +10:00
os-area.c powerpc: Remove asm/prom.h from all files that don't need it 2022-05-08 22:15:04 +10:00
platform.h powerpc/ps3: Add __init attribute to eligible functions 2021-12-23 22:33:16 +11:00
repository.c powerpc/ps3: refactor strncpy usage 2023-08-18 11:48:42 +10:00
setup.c powerpc/platforms: Use 'compatible' property for simple cases 2023-03-15 00:52:10 +11:00
smp.c powerpc/ps3: Add __init attribute to eligible functions 2021-12-23 22:33:16 +11:00
spu.c powerpc/ps3: Add __init attribute to eligible functions 2021-12-23 22:33:16 +11:00
system-bus.c driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
time.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167 2019-05-30 11:26:39 -07:00