linux/drivers/pcmcia
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
..
bcm63xx_pcmcia.c pcmcia: bcm63xx: Convert to platform remove callback returning void 2023-12-15 17:07:28 +01:00
bcm63xx_pcmcia.h
cardbus.c pcmcia: include cs_internal.h for missing declarations 2019-11-22 07:03:04 +01:00
cirrus.h
cistpl.c pcmcia: cistpl: Demote non-conformant kernel-doc headers to standard comments 2021-03-15 08:22:22 +01:00
cs_internal.h pcmcia: cs: make pcmcia_socket_class constant 2024-03-10 09:07:00 +01:00
cs.c pcmcia: cs: make pcmcia_socket_class constant 2024-03-10 09:07:00 +01:00
db1xxx_ss.c pcmcia: db1xxx_ss: Convert to platform remove callback returning void 2023-12-15 17:07:28 +01:00
ds.c driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
electra_cf.c pcmcia: electra_cf: Convert to platform remove callback returning void 2023-12-15 17:07:28 +01:00
i82092.c pcmcia: Add __init/__exit annotations to module init/exit funcs 2022-09-22 16:45:25 +02:00
i82092aa.h PCMCIA/i82092: delete enter/leave macro 2019-12-16 11:49:54 +01:00
i82365.c
i82365.h
Kconfig pcmcia : make PCMCIA depend on HAS_IOMEM 2023-08-04 15:39:44 +02:00
Makefile pcmcia: remove unused pxa/sa1100 drivers 2023-02-01 17:23:38 +01:00
max1600.c
max1600.h
o2micro.h
omap_cf.c pcmcia: omap_cf: Convert to platform remove callback returning void 2023-12-15 17:07:28 +01:00
pcmcia_cis.c pcmcia: hide the MAC address helpers if !NET 2021-11-22 14:02:52 +00:00
pcmcia_resource.c pcmcia: typo fix 2023-09-03 10:45:47 +02:00
pd6729.c treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
pd6729.h
pxa2xx_base.c pcmcia: pxa2xx: Convert to platform remove callback returning void 2023-12-15 17:07:28 +01:00
pxa2xx_base.h
pxa2xx_sharpsl.c ARM: pxa: move pcmcia board data into mach-pxa 2022-04-19 21:34:05 +02:00
ricoh.h
rsrc_iodyn.c
rsrc_mgr.c
rsrc_nonstatic.c pcmcia: rsrc_nonstatic: Fix memory leak in nonstatic_release_resource_db() 2023-06-15 13:42:18 +02:00
sa11xx_base.c
sa11xx_base.h
sa1100_generic.c pcmcia: sa1100: Convert to platform remove callback returning void 2023-12-15 17:07:28 +01:00
sa1100_generic.h
sa1100_h3600.c ARM: sa1100: remove unused board files 2023-01-12 10:53:12 +01:00
sa1111_generic.c ARM: pxa: remove unused board files 2023-01-20 11:23:44 +01:00
sa1111_generic.h
sa1111_jornada720.c
sa1111_neponset.c
soc_common.c ARM: pxa/sa1100: move I/O space to PCI_IOBASE 2022-05-07 22:56:17 +02:00
soc_common.h ARM: pxa: move pcmcia board data into mach-pxa 2022-04-19 21:34:05 +02:00
socket_sysfs.c pcmcia: use sysfs_emit{,_at} for sysfs output 2022-01-06 09:15:52 +01:00
tcic.c pcmcia: tcic: remove unneeded "&" in call to setup_timer() 2023-09-03 10:45:53 +02:00
tcic.h
ti113x.h
topic.h
vg468.h
xxs1500_ss.c pcmcia: xxs1500_ss: Convert to platform remove callback returning void 2023-12-15 17:07:28 +01:00
yenta_socket.c treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
yenta_socket.h