summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorShraddha Barke <shraddha.6596@gmail.com>2015-09-30 00:51:28 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-09-30 04:02:58 +0200
commitb3ce2076c70087c31a03d87900a7b868d0ead1bb (patch)
tree8efb48ba1a21075826227b65d67ad48bfd1c5f41 /drivers
parentd0a76bbfe920e056e761bfcb77f3b95bd3bce98f (diff)
downloadlinux-stable-b3ce2076c70087c31a03d87900a7b868d0ead1bb.tar.gz
linux-stable-b3ce2076c70087c31a03d87900a7b868d0ead1bb.tar.bz2
linux-stable-b3ce2076c70087c31a03d87900a7b868d0ead1bb.zip
Staging: media: lirc: Use USB API functions rather than constants
Introduce use of function usb_endpoint_is_int_in() and usb_endpoint_is_int_out(). Also remove the variables ep_dir and ep_type as they are not used anymore. Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/media/lirc/lirc_sasem.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/staging/media/lirc/lirc_sasem.c b/drivers/staging/media/lirc/lirc_sasem.c
index b247649a99eb..d3dedb831dee 100644
--- a/drivers/staging/media/lirc/lirc_sasem.c
+++ b/drivers/staging/media/lirc/lirc_sasem.c
@@ -697,16 +697,11 @@ static int sasem_probe(struct usb_interface *interface,
for (i = 0; i < num_endpoints && !(ir_ep_found && vfd_ep_found); ++i) {
struct usb_endpoint_descriptor *ep;
- int ep_dir;
- int ep_type;
ep = &iface_desc->endpoint [i].desc;
- ep_dir = ep->bEndpointAddress & USB_ENDPOINT_DIR_MASK;
- ep_type = ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK;
if (!ir_ep_found &&
- ep_dir == USB_DIR_IN &&
- ep_type == USB_ENDPOINT_XFER_INT) {
+ usb_endpoint_is_int_in(ep)) {
rx_endpoint = ep;
ir_ep_found = 1;
@@ -715,8 +710,7 @@ static int sasem_probe(struct usb_interface *interface,
"%s: found IR endpoint\n", __func__);
} else if (!vfd_ep_found &&
- ep_dir == USB_DIR_OUT &&
- ep_type == USB_ENDPOINT_XFER_INT) {
+ usb_endpoint_is_int_out(ep)) {
tx_endpoint = ep;
vfd_ep_found = 1;