Browse Source

usb: core: add a new usb_get_ptm_status() helper

Drivers who are interested in the PTM status stype, should use this
new helper to make sure they issue the correct GetStatus message.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Felipe Balbi 7 years ago
parent
commit
f8f3e4acbd
1 changed files with 6 additions and 0 deletions
  1. 6 0
      include/linux/usb.h

+ 6 - 0
include/linux/usb.h

@@ -1775,6 +1775,12 @@ static inline int usb_get_std_status(struct usb_device *dev,
 		data);
 		data);
 }
 }
 
 
+static inline int usb_get_ptm_status(struct usb_device *dev, void *data)
+{
+	return usb_get_status(dev, USB_RECIP_DEVICE, USB_STATUS_TYPE_PTM,
+		0, data);
+}
+
 extern int usb_string(struct usb_device *dev, int index,
 extern int usb_string(struct usb_device *dev, int index,
 	char *buf, size_t size);
 	char *buf, size_t size);