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

usb: core: rename usb_get_status() 'type' argument to 'recip'

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.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Felipe Balbi and committed by
Greg Kroah-Hartman
3c377ef1 6f27f4f9

+4 -4
+3 -3
drivers/usb/core/message.c
··· 918 918 /** 919 919 * usb_get_status - issues a GET_STATUS call 920 920 * @dev: the device whose status is being checked 921 - * @type: USB_RECIP_*; for device, interface, or endpoint 921 + * @recip: USB_RECIP_*; for device, interface, or endpoint 922 922 * @target: zero (for device), else interface or endpoint number 923 923 * @data: pointer to two bytes of bitmap data 924 924 * Context: !in_interrupt () ··· 937 937 * Returns 0 and the status value in *@data (in host byte order) on success, 938 938 * or else the status code from the underlying usb_control_msg() call. 939 939 */ 940 - int usb_get_status(struct usb_device *dev, int type, int target, void *data) 940 + int usb_get_status(struct usb_device *dev, int recip, int target, void *data) 941 941 { 942 942 int ret; 943 943 __le16 *status = kmalloc(sizeof(*status), GFP_KERNEL); ··· 946 946 return -ENOMEM; 947 947 948 948 ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), 949 - USB_REQ_GET_STATUS, USB_DIR_IN | type, USB_STATUS_TYPE_STANDARD, 949 + USB_REQ_GET_STATUS, USB_DIR_IN | recip, USB_STATUS_TYPE_STANDARD, 950 950 target, status, sizeof(*status), USB_CTRL_GET_TIMEOUT); 951 951 952 952 if (ret == 2) {
+1 -1
include/linux/usb.h
··· 1766 1766 extern int usb_get_descriptor(struct usb_device *dev, unsigned char desctype, 1767 1767 unsigned char descindex, void *buf, int size); 1768 1768 extern int usb_get_status(struct usb_device *dev, 1769 - int type, int target, void *data); 1769 + int recip, int target, void *data); 1770 1770 extern int usb_string(struct usb_device *dev, int index, 1771 1771 char *buf, size_t size); 1772 1772