linux/drivers
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
..
accel
accessibility
acpi driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
amba driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
android
ata ata: libata-scsi: Set the RMB bit only for removable media devices 2024-06-14 14:18:46 +02:00
atm
auxdisplay
base driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
bcma driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
block loop: Disable fallocate() zero and discard if not supported 2024-06-14 06:21:25 -06:00
bluetooth
bus driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
cache
cdrom
cdx driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
char tpm: Switch to new Intel CPU model defines 2024-06-05 04:55:04 +03:00
clk ARM/clkdev fixes for v6.10 2024-06-12 16:58:05 -07:00
clocksource
comedi
connector
counter
cpufreq cpufreq: intel_pstate: Check turbo_is_disabled() in store_no_turbo() 2024-06-12 14:11:50 +02:00
cpuidle
crypto
cxl driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
dax driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
dca dca: make dca_class a static const structure 2024-06-10 10:22:20 +02:00
devfreq
dio
dma driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
dma-buf Merge remote-tracking branch 'drm/drm-fixes' into drm-misc-fixes 2024-05-28 22:21:34 +02:00
dpll
edac EDAC/igen6: Convert PCIBIOS_* return codes to errnos 2024-06-04 11:29:52 +02:00
eisa driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
extcon
firewire driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
firmware driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
fpga driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
fsi driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
gnss
gpio driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
gpu driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
greybus driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
hid driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
hsi driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
hte
hv driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
hwmon hwmon: (shtc1) Fix property misspelling 2024-05-30 09:05:19 -07:00
hwspinlock
hwtracing driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
i2c driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
i3c driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
idle
iio iio: inkern: fix channel read regression 2024-06-03 20:29:31 +01:00
infiniband
input driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
interconnect
iommu iommu/amd: Fix panic accessing amd_iommu_enable_faulting 2024-06-13 11:16:05 +02:00
ipack driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
irqchip irqchip/gic-v3-its: Fix potential race condition in its_vlpi_prop_update() 2024-06-03 18:20:00 +02:00
isdn
leds leds: class: Revert: "If no default trigger is given, make hw_control trigger the default trigger" 2024-06-16 09:33:28 -07:00
macintosh driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
mailbox mailbox: zynqmp-ipi: drop irq_to_desc() call 2024-05-31 12:39:15 -05:00
mcb driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
md bcache: code cleanup in __bch_bucket_alloc_set() 2024-05-28 06:55:59 -06:00
media driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
memory
memstick driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
message
mfd driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
misc driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
mmc driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
most driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
mtd
mux
net driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
nfc nfc/nci: Add the inconsistency check between the input data length and count 2024-05-29 13:08:31 +01:00
ntb driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
nubus
nvdimm driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
nvme nvme fixes for Linux 6.10 2024-06-13 14:19:57 -06:00
nvmem driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
of of: property: Fix fw_devlink handling of interrupt-map 2024-05-30 19:43:47 -05:00
opp
parisc
parport parport: make parport_bus_type const 2024-06-18 16:05:14 +02:00
pci driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
pcmcia driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
peci driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
perf
phy
pinctrl
platform driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
pmdomain
pnp driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
power
powercap
pps
ps3
ptp ptp: Fix error message on failed pin verification 2024-06-05 16:01:16 -07:00
pwm
rapidio driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
ras RAS/AMD/ATL: Use system settings for MI300 DRAM to normalized address translation 2024-06-16 11:22:57 +02:00
regulator regulator: rtq2208: Fix invalid memory access when devm_of_regulator_put_matches is called 2024-05-28 13:22:54 +01:00
remoteproc
reset
rpmsg driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
rtc
s390 driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
sbus
scsi driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
sh driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
siox driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
slimbus driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
soc driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
soundwire driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
spi driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
spmi driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
ssb driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
staging driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
target
tc driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
tee driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
thermal thermal: gov_step_wise: Restore passive polling management 2024-06-11 21:00:44 +02:00
thunderbolt driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
tty driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
ufs scsi: ufs: core: Quiesce request queues before checking pending cmds 2024-06-11 21:22:33 -04:00
uio
usb driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
vdpa driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
vfio driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
vhost
video
virt
virtio driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
w1
watchdog
xen driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
zorro
Kconfig
Makefile