]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/staging/media/lirc/lirc_sasem.c
Merge remote-tracking branch 'y2038/y2038'
[karo-tx-linux.git] / drivers / staging / media / lirc / lirc_sasem.c
index c14ca7e0945b5a346e85709570540795c91f2978..2218d0042030ed29ba95376c8d1dd310f1ce2437 100644 (file)
@@ -182,7 +182,7 @@ static void deregister_from_lirc(struct sasem_context *context)
        if (retval)
                dev_err(&context->dev->dev,
                        "%s: unable to deregister from lirc (%d)\n",
-                      __func__, retval);
+                       __func__, retval);
        else
                dev_info(&context->dev->dev,
                         "Deregistered Sasem driver (minor:%d)\n", minor);
@@ -245,7 +245,7 @@ exit:
  */
 static long vfd_ioctl(struct file *file, unsigned cmd, unsigned long arg)
 {
-       struct sasem_context *context = NULL;
+       struct sasem_context *context;
 
        context = (struct sasem_context *) file->private_data;
 
@@ -695,16 +695,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;
@@ -713,8 +708,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;