Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: core: rename usb_driver_claim_interface() data parameter

It's been almost twenty years since the interface "private data" pointer
was removed in favour of using the driver-data pointer of struct device.

Let's rename the driver-data parameter of usb_driver_claim_interface()
so that it better reflects how it's used.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20210318155406.22399-2-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Johan Hovold and committed by
Greg Kroah-Hartman
aaadc6ae a2a28c25

+4 -4
+3 -3
drivers/usb/core/driver.c
··· 519 519 * @driver: the driver to be bound 520 520 * @iface: the interface to which it will be bound; must be in the 521 521 * usb device's active configuration 522 - * @priv: driver data associated with that interface 522 + * @data: driver data associated with that interface 523 523 * 524 524 * This is used by usb device drivers that need to claim more than one 525 525 * interface on a device when probing (audio and acm are current examples). ··· 533 533 * Return: 0 on success. 534 534 */ 535 535 int usb_driver_claim_interface(struct usb_driver *driver, 536 - struct usb_interface *iface, void *priv) 536 + struct usb_interface *iface, void *data) 537 537 { 538 538 struct device *dev; 539 539 int retval = 0; ··· 550 550 return -ENODEV; 551 551 552 552 dev->driver = &driver->drvwrap.driver; 553 - usb_set_intfdata(iface, priv); 553 + usb_set_intfdata(iface, data); 554 554 iface->needs_binding = 0; 555 555 556 556 iface->condition = USB_INTERFACE_BOUND;
+1 -1
include/linux/usb.h
··· 841 841 842 842 /* used these for multi-interface device registration */ 843 843 extern int usb_driver_claim_interface(struct usb_driver *driver, 844 - struct usb_interface *iface, void *priv); 844 + struct usb_interface *iface, void *data); 845 845 846 846 /** 847 847 * usb_interface_claimed - returns true iff an interface is claimed