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 The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
accessibility Char/Misc bugfix for 6.10-rc1 2024-05-24 08:43:25 -07:00
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 - Fix-ups 2024-05-22 10:45:12 -07:00
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 virtio: features, fixes, cleanups 2024-05-23 12:04:36 -07:00
bus driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
cache
cdrom cdrom: rearrange last_media_change check to avoid unintentional overflow 2024-05-15 12:59:55 -06:00
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 RISC-V Patches for the 6.10 Merge Window, Part 1 2024-05-22 09:56:00 -07:00
comedi
connector
counter
cpufreq cpufreq: intel_pstate: Check turbo_is_disabled() in store_no_turbo() 2024-06-12 14:11:50 +02:00
cpuidle pmdomain core: 2024-05-16 08:50:32 -07:00
crypto virtio: features, fixes, cleanups 2024-05-23 12:04:36 -07:00
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 dpll: fix return value check for kmemdup 2024-05-13 16:53:53 -07:00
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 tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
input driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
interconnect tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
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 ARM development updates for v6.10-rc1 2024-05-17 08:53:47 -07:00
memstick driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
message SCSI misc on 20240514 2024-05-14 18:25:53 -07:00
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 bd_inode series 2024-05-21 09:51:42 -07:00
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 OPP Updates for 6.10 2024-05-17 13:01:24 +02:00
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 arm64 fixes for -rc1 2024-05-23 12:09:22 -07:00
phy phy-for-6.10 2024-05-21 11:19:18 -07:00
pinctrl - New Device Support 2024-05-22 10:41:14 -07:00
platform driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
pmdomain pmdomain providers: 2024-05-27 08:18:31 -07:00
pnp driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
power I2C core removes an argument from the i2c_mux_add_adapter() call to 2024-05-20 08:55:18 -07:00
powercap
pps pps: clients: gpio: Convert to platform remove callback returning void 2024-05-27 10:13:55 +02:00
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 Merge branch 'reset/next' of git://git.pengutronix.de/pza/linux 2024-05-27 10:10:43 +02:00
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 Assorted commits that had missed the last merge window... 2024-05-21 13:11:44 -07:00
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 virtio: features, fixes, cleanups 2024-05-23 12:04:36 -07:00
video - Fix-ups 2024-05-22 10:45:12 -07:00
virt The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
virtio driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
w1
watchdog watchdog: LENOVO_SE10_WDT should depend on X86 && DMI 2024-05-11 11:32:06 +02:00
xen driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
zorro
Kconfig
Makefile