mirror of
https://github.com/torvalds/linux.git
synced 2025-11-03 10:10:33 +02:00
There is usbdrv_wrap in struct usb_driver and usb_device_driver, it contains device_driver and for_devices. for_devices is used to distinguish between device drivers and interface drivers. Like the is_usb_device(), it tests the type of the device. We can test that if the probe of device_driver is equal to usb_probe_device in is_usb_device_driver(), and then the struct usbdrv_wrap is no longer needed. Clean up struct usbdrv_wrap, use device_driver directly in struct usb_driver and usb_device_driver. This makes the code cleaner. Signed-off-by: Yajun Deng <yajun.deng@linux.dev> Acked-by: Alan Stern <stern@rowland.harvard.edu> Link: https://lore.kernel.org/r/20240104032822.1896596-1-yajun.deng@linux.dev Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
||
|---|---|---|
| .. | ||
| buffer.c | ||
| config.c | ||
| devices.c | ||
| devio.c | ||
| driver.c | ||
| endpoint.c | ||
| file.c | ||
| generic.c | ||
| hcd-pci.c | ||
| hcd.c | ||
| hub.c | ||
| hub.h | ||
| Kconfig | ||
| ledtrig-usbport.c | ||
| Makefile | ||
| message.c | ||
| notify.c | ||
| of.c | ||
| otg_productlist.h | ||
| phy.c | ||
| phy.h | ||
| port.c | ||
| quirks.c | ||
| sysfs.c | ||
| urb.c | ||
| usb-acpi.c | ||
| usb.c | ||
| usb.h | ||