diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-09-27 18:13:53 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-09-27 18:13:53 -0400 |
commit | aebb1153ac54ddbbd3d3f0481a193f4bf0ead53b (patch) | |
tree | 57425aa83c8bed5b41af7e3408024fe1f2fdded9 /drivers/usb/class/usblp.c | |
parent | 022e7a12b6aa11a11de4d708fe8606c9a6734b37 (diff) | |
parent | a77c64c1a641950626181b4857abb701d8f38ccc (diff) |
Merge branch 'master' into upstream
Diffstat (limited to 'drivers/usb/class/usblp.c')
-rw-r--r-- | drivers/usb/class/usblp.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c index 48dee4b8d8e5..9cac11ca1bb7 100644 --- a/drivers/usb/class/usblp.c +++ b/drivers/usb/class/usblp.c | |||
@@ -813,7 +813,7 @@ static unsigned int usblp_quirks (__u16 vendor, __u16 product) | |||
813 | return 0; | 813 | return 0; |
814 | } | 814 | } |
815 | 815 | ||
816 | static struct file_operations usblp_fops = { | 816 | static const struct file_operations usblp_fops = { |
817 | .owner = THIS_MODULE, | 817 | .owner = THIS_MODULE, |
818 | .read = usblp_read, | 818 | .read = usblp_read, |
819 | .write = usblp_write, | 819 | .write = usblp_write, |
@@ -927,7 +927,9 @@ static int usblp_probe(struct usb_interface *intf, | |||
927 | 927 | ||
928 | /* Retrieve and store the device ID string. */ | 928 | /* Retrieve and store the device ID string. */ |
929 | usblp_cache_device_id_string(usblp); | 929 | usblp_cache_device_id_string(usblp); |
930 | device_create_file(&intf->dev, &dev_attr_ieee1284_id); | 930 | retval = device_create_file(&intf->dev, &dev_attr_ieee1284_id); |
931 | if (retval) | ||
932 | goto abort_intfdata; | ||
931 | 933 | ||
932 | #ifdef DEBUG | 934 | #ifdef DEBUG |
933 | usblp_check_status(usblp, 0); | 935 | usblp_check_status(usblp, 0); |
@@ -1021,18 +1023,13 @@ static int usblp_select_alts(struct usblp *usblp) | |||
1021 | for (e = 0; e < ifd->desc.bNumEndpoints; e++) { | 1023 | for (e = 0; e < ifd->desc.bNumEndpoints; e++) { |
1022 | epd = &ifd->endpoint[e].desc; | 1024 | epd = &ifd->endpoint[e].desc; |
1023 | 1025 | ||
1024 | if ((epd->bmAttributes&USB_ENDPOINT_XFERTYPE_MASK)!= | 1026 | if (usb_endpoint_is_bulk_out(epd)) |
1025 | USB_ENDPOINT_XFER_BULK) | ||
1026 | continue; | ||
1027 | |||
1028 | if (!(epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK)) { | ||
1029 | if (!epwrite) | 1027 | if (!epwrite) |
1030 | epwrite = epd; | 1028 | epwrite = epd; |
1031 | 1029 | ||
1032 | } else { | 1030 | if (usb_endpoint_is_bulk_in(epd)) |
1033 | if (!epread) | 1031 | if (!epread) |
1034 | epread = epd; | 1032 | epread = epd; |
1035 | } | ||
1036 | } | 1033 | } |
1037 | 1034 | ||
1038 | /* Ignore buggy hardware without the right endpoints. */ | 1035 | /* Ignore buggy hardware without the right endpoints. */ |