1
linux/drivers/usb/serial
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
..
aircable.c
ark3116.c USB: serial: return errors from break handling 2023-06-07 17:00:23 +02:00
belkin_sa.c USB: serial: return errors from break handling 2023-06-07 17:00:23 +02:00
belkin_sa.h
bus.c driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
ch341.c USB: serial: return errors from break handling 2023-06-07 17:00:23 +02:00
console.c tty: Cleanup tty_port_set_initialized() bool parameter 2023-01-19 16:04:34 +01:00
cp210x.c USB: serial: cp210x: add pid/vid for TDK NC0110013M and MM0110113M 2024-03-05 07:51:37 +01:00
cyberjack.c
cypress_m8.c
cypress_m8.h
digi_acceleport.c USB: serial: return errors from break handling 2023-06-07 17:00:23 +02:00
empeg.c
ezusb_convert.pl
f81232.c USB: serial: return errors from break handling 2023-06-07 17:00:23 +02:00
f81534.c USB: serial: return errors from break handling 2023-06-07 17:00:23 +02:00
ftdi_sio_ids.h USB: serial: ftdi_sio: add support for GMC Z216C Adapter IR-USB 2024-03-04 11:07:47 +01:00
ftdi_sio.c USB: serial: ftdi_sio: remove redundant assignment to variable cflag 2024-03-04 14:54:02 +01:00
ftdi_sio.h
garmin_gps.c
generic.c
io_16654.h
io_edgeport.c USB: serial: return errors from break handling 2023-06-07 17:00:23 +02:00
io_edgeport.h
io_ionsp.h
io_ti.c USB: serial: return errors from break handling 2023-06-07 17:00:23 +02:00
io_ti.h
io_usbvend.h
ipaq.c
ipw.c
ir-usb.c
iuu_phoenix.c
iuu_phoenix.h
Kconfig
keyspan_pda.c USB: serial: return errors from break handling 2023-06-07 17:00:23 +02:00
keyspan_usa26msg.h
keyspan_usa28msg.h
keyspan_usa49msg.h
keyspan_usa67msg.h
keyspan_usa90msg.h
keyspan.c USB: serial: keyspan: remove redundant assignment to pointer data 2024-03-04 14:54:36 +01:00
kl5kusb105.c
kl5kusb105.h
kobil_sct.c
kobil_sct.h
Makefile
Makefile-keyspan_pda_fw
mct_u232.c USB: serial: return errors from break handling 2023-06-07 17:00:23 +02:00
mct_u232.h
metro-usb.c
mos7720.c USB: serial: return errors from break handling 2023-06-07 17:00:23 +02:00
mos7840.c USB: serial: return errors from break handling 2023-06-07 17:00:23 +02:00
mxuport.c USB: serial: return errors from break handling 2023-06-07 17:00:23 +02:00
navman.c
omninet.c
opticon.c
option.c USB: serial: option: add Telit FN920C04 rmnet compositions 2024-04-18 17:14:49 +02:00
oti6858.c USB: serial: oti6858: remove redundant assignment to variable divisor 2024-03-04 14:37:52 +01:00
oti6858.h
pl2303.c USB: serial: return errors from break handling 2023-06-07 17:00:23 +02:00
pl2303.h
qcaux.c
qcserial.c USB: serial: qcserial: add new usb-id for Dell Wireless DW5826e 2024-01-30 16:03:17 +01:00
quatech2.c USB: serial: return errors from break handling 2023-06-07 17:00:23 +02:00
safe_serial.c
sierra.c
spcp8x5.c
ssu100.c
symbolserial.c
ti_usb_3410_5052.c USB: serial: return errors from break handling 2023-06-07 17:00:23 +02:00
upd78f0730.c USB: serial: return errors from break handling 2023-06-07 17:00:23 +02:00
usb_debug.c USB: serial: return errors from break handling 2023-06-07 17:00:23 +02:00
usb_wwan.c
usb-serial-simple.c USB: serial: simple: sort driver entries 2023-07-20 15:59:25 +02:00
usb-serial.c USB: core: Use device_driver directly in struct usb_driver and usb_device_driver 2024-01-04 16:06:32 +01:00
usb-wwan.h
visor.c
visor.h
whiteheat.c USB: serial: return errors from break handling 2023-06-07 17:00:23 +02:00
whiteheat.h
wishbone-serial.c
xr_serial.c USB: serial: xr: add TIOCGRS485 and TIOCSRS485 ioctls 2023-07-20 15:37:03 +02:00
xsens_mt.c