Commit aaadc6ae authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

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: default avatarJohan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20210318155406.22399-2-johan@kernel.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a2a28c25
...@@ -519,7 +519,7 @@ static int usb_unbind_interface(struct device *dev) ...@@ -519,7 +519,7 @@ static int usb_unbind_interface(struct device *dev)
* @driver: the driver to be bound * @driver: the driver to be bound
* @iface: the interface to which it will be bound; must be in the * @iface: the interface to which it will be bound; must be in the
* usb device's active configuration * usb device's active configuration
* @priv: driver data associated with that interface * @data: driver data associated with that interface
* *
* This is used by usb device drivers that need to claim more than one * This is used by usb device drivers that need to claim more than one
* interface on a device when probing (audio and acm are current examples). * interface on a device when probing (audio and acm are current examples).
...@@ -533,7 +533,7 @@ static int usb_unbind_interface(struct device *dev) ...@@ -533,7 +533,7 @@ static int usb_unbind_interface(struct device *dev)
* Return: 0 on success. * Return: 0 on success.
*/ */
int usb_driver_claim_interface(struct usb_driver *driver, int usb_driver_claim_interface(struct usb_driver *driver,
struct usb_interface *iface, void *priv) struct usb_interface *iface, void *data)
{ {
struct device *dev; struct device *dev;
int retval = 0; int retval = 0;
...@@ -550,7 +550,7 @@ int usb_driver_claim_interface(struct usb_driver *driver, ...@@ -550,7 +550,7 @@ int usb_driver_claim_interface(struct usb_driver *driver,
return -ENODEV; return -ENODEV;
dev->driver = &driver->drvwrap.driver; dev->driver = &driver->drvwrap.driver;
usb_set_intfdata(iface, priv); usb_set_intfdata(iface, data);
iface->needs_binding = 0; iface->needs_binding = 0;
iface->condition = USB_INTERFACE_BOUND; iface->condition = USB_INTERFACE_BOUND;
......
...@@ -841,7 +841,7 @@ extern int usb_free_streams(struct usb_interface *interface, ...@@ -841,7 +841,7 @@ extern int usb_free_streams(struct usb_interface *interface,
/* used these for multi-interface device registration */ /* used these for multi-interface device registration */
extern int usb_driver_claim_interface(struct usb_driver *driver, extern int usb_driver_claim_interface(struct usb_driver *driver,
struct usb_interface *iface, void *priv); struct usb_interface *iface, void *data);
/** /**
* usb_interface_claimed - returns true iff an interface is claimed * usb_interface_claimed - returns true iff an interface is claimed
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment