diff options
| author | Steven Whitehouse <swhiteho@redhat.com> | 2006-09-28 08:29:59 -0400 |
|---|---|---|
| committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-09-28 08:29:59 -0400 |
| commit | 185a257f2f73bcd89050ad02da5bedbc28fc43fa (patch) | |
| tree | 5e32586114534ed3f2165614cba3d578f5d87307 /drivers/usb/misc/ldusb.c | |
| parent | 3f1a9aaeffd8d1cbc5ab9776c45cbd66af1c9699 (diff) | |
| parent | a77c64c1a641950626181b4857abb701d8f38ccc (diff) | |
Merge branch 'master' into gfs2
Diffstat (limited to 'drivers/usb/misc/ldusb.c')
| -rw-r--r-- | drivers/usb/misc/ldusb.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/usb/misc/ldusb.c b/drivers/usb/misc/ldusb.c index f30ab1fbb3c8..10b640339d8d 100644 --- a/drivers/usb/misc/ldusb.c +++ b/drivers/usb/misc/ldusb.c | |||
| @@ -589,7 +589,7 @@ exit: | |||
| 589 | } | 589 | } |
| 590 | 590 | ||
| 591 | /* file operations needed when we register this driver */ | 591 | /* file operations needed when we register this driver */ |
| 592 | static struct file_operations ld_usb_fops = { | 592 | static const struct file_operations ld_usb_fops = { |
| 593 | .owner = THIS_MODULE, | 593 | .owner = THIS_MODULE, |
| 594 | .read = ld_usb_read, | 594 | .read = ld_usb_read, |
| 595 | .write = ld_usb_write, | 595 | .write = ld_usb_write, |
| @@ -657,15 +657,11 @@ static int ld_usb_probe(struct usb_interface *intf, const struct usb_device_id * | |||
| 657 | for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) { | 657 | for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) { |
| 658 | endpoint = &iface_desc->endpoint[i].desc; | 658 | endpoint = &iface_desc->endpoint[i].desc; |
| 659 | 659 | ||
| 660 | if (((endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) && | 660 | if (usb_endpoint_is_int_in(endpoint)) |
| 661 | ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT)) { | ||
| 662 | dev->interrupt_in_endpoint = endpoint; | 661 | dev->interrupt_in_endpoint = endpoint; |
| 663 | } | ||
| 664 | 662 | ||
| 665 | if (((endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT) && | 663 | if (usb_endpoint_is_int_out(endpoint)) |
| 666 | ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT)) { | ||
| 667 | dev->interrupt_out_endpoint = endpoint; | 664 | dev->interrupt_out_endpoint = endpoint; |
| 668 | } | ||
| 669 | } | 665 | } |
| 670 | if (dev->interrupt_in_endpoint == NULL) { | 666 | if (dev->interrupt_in_endpoint == NULL) { |
| 671 | dev_err(&intf->dev, "Interrupt in endpoint not found\n"); | 667 | dev_err(&intf->dev, "Interrupt in endpoint not found\n"); |
