USB: allow some usb functions to take a const pointer.
The functions to_usb_interface(), to_usb_device, and interface_to_usbdev() sometimes would like to take a const * and return a const * back. As we are doing pointer math, a call to container_of() loses the const-ness of a pointer, so use a _Generic() macro to pick the proper inline function to call instead. Link: https://lore.kernel.org/r/20221016104155.1260201-1-gregkh@linuxfoundation.orgSigned-off-by:Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
Please register or sign in to comment