diff options
Diffstat (limited to 'drivers/usb/misc/ldusb.c')
-rw-r--r-- | drivers/usb/misc/ldusb.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/usb/misc/ldusb.c b/drivers/usb/misc/ldusb.c index 966acb474f6..10b640339d8 100644 --- a/drivers/usb/misc/ldusb.c +++ b/drivers/usb/misc/ldusb.c | |||
@@ -27,7 +27,6 @@ | |||
27 | * V0.13 (mh) Added support for LD X-Ray and Machine Test System | 27 | * V0.13 (mh) Added support for LD X-Ray and Machine Test System |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/config.h> | ||
31 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
32 | #include <linux/errno.h> | 31 | #include <linux/errno.h> |
33 | #include <linux/init.h> | 32 | #include <linux/init.h> |
@@ -590,7 +589,7 @@ exit: | |||
590 | } | 589 | } |
591 | 590 | ||
592 | /* file operations needed when we register this driver */ | 591 | /* file operations needed when we register this driver */ |
593 | static struct file_operations ld_usb_fops = { | 592 | static const struct file_operations ld_usb_fops = { |
594 | .owner = THIS_MODULE, | 593 | .owner = THIS_MODULE, |
595 | .read = ld_usb_read, | 594 | .read = ld_usb_read, |
596 | .write = ld_usb_write, | 595 | .write = ld_usb_write, |
@@ -658,15 +657,11 @@ static int ld_usb_probe(struct usb_interface *intf, const struct usb_device_id * | |||
658 | for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) { | 657 | for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) { |
659 | endpoint = &iface_desc->endpoint[i].desc; | 658 | endpoint = &iface_desc->endpoint[i].desc; |
660 | 659 | ||
661 | if (((endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) && | 660 | if (usb_endpoint_is_int_in(endpoint)) |
662 | ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT)) { | ||
663 | dev->interrupt_in_endpoint = endpoint; | 661 | dev->interrupt_in_endpoint = endpoint; |
664 | } | ||
665 | 662 | ||
666 | if (((endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT) && | 663 | if (usb_endpoint_is_int_out(endpoint)) |
667 | ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT)) { | ||
668 | dev->interrupt_out_endpoint = endpoint; | 664 | dev->interrupt_out_endpoint = endpoint; |
669 | } | ||
670 | } | 665 | } |
671 | if (dev->interrupt_in_endpoint == NULL) { | 666 | if (dev->interrupt_in_endpoint == NULL) { |
672 | dev_err(&intf->dev, "Interrupt in endpoint not found\n"); | 667 | dev_err(&intf->dev, "Interrupt in endpoint not found\n"); |