This makes it a lot clearer that we're expecting a recipient as the
argument. A follow-up patch will use the argument 'type' as the status
type selector (standard or ptm).

Signed-off-by: Felipe Balbi <felipe.ba...@linux.intel.com>
---
 drivers/usb/core/message.c | 6 +++---
 include/linux/usb.h        | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
index 491dd4c04d76..dea2d0a110b3 100644
--- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c
@@ -918,7 +918,7 @@ int usb_get_device_descriptor(struct usb_device *dev, 
unsigned int size)
 /**
  * usb_get_status - issues a GET_STATUS call
  * @dev: the device whose status is being checked
- * @type: USB_RECIP_*; for device, interface, or endpoint
+ * @recip: USB_RECIP_*; for device, interface, or endpoint
  * @target: zero (for device), else interface or endpoint number
  * @data: pointer to two bytes of bitmap data
  * Context: !in_interrupt ()
@@ -937,7 +937,7 @@ int usb_get_device_descriptor(struct usb_device *dev, 
unsigned int size)
  * Returns 0 and the status value in *@data (in host byte order) on success,
  * or else the status code from the underlying usb_control_msg() call.
  */
-int usb_get_status(struct usb_device *dev, int type, int target, void *data)
+int usb_get_status(struct usb_device *dev, int recip, int target, void *data)
 {
        int ret;
        __le16 *status = kmalloc(sizeof(*status), GFP_KERNEL);
@@ -946,7 +946,7 @@ int usb_get_status(struct usb_device *dev, int type, int 
target, void *data)
                return -ENOMEM;
 
        ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
-               USB_REQ_GET_STATUS, USB_DIR_IN | type, USB_STATUS_TYPE_STANDARD,
+               USB_REQ_GET_STATUS, USB_DIR_IN | recip, 
USB_STATUS_TYPE_STANDARD,
                target, status, sizeof(*status), USB_CTRL_GET_TIMEOUT);
 
        if (ret == 2) {
diff --git a/include/linux/usb.h b/include/linux/usb.h
index cb9fbd54386e..2e2c1d40081b 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -1766,7 +1766,7 @@ extern int usb_bulk_msg(struct usb_device *usb_dev, 
unsigned int pipe,
 extern int usb_get_descriptor(struct usb_device *dev, unsigned char desctype,
        unsigned char descindex, void *buf, int size);
 extern int usb_get_status(struct usb_device *dev,
-       int type, int target, void *data);
+       int recip, int target, void *data);
 extern int usb_string(struct usb_device *dev, int index,
        char *buf, size_t size);
 
-- 
2.14.2.642.g20fed7cad4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to