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/misc/usblcd.c | |
parent | 022e7a12b6aa11a11de4d708fe8606c9a6734b37 (diff) | |
parent | a77c64c1a641950626181b4857abb701d8f38ccc (diff) |
Merge branch 'master' into upstream
Diffstat (limited to 'drivers/usb/misc/usblcd.c')
-rw-r--r-- | drivers/usb/misc/usblcd.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/usb/misc/usblcd.c b/drivers/usb/misc/usblcd.c index e095772dd8e9..dbaca9f1efad 100644 --- a/drivers/usb/misc/usblcd.c +++ b/drivers/usb/misc/usblcd.c | |||
@@ -239,7 +239,7 @@ error: | |||
239 | return retval; | 239 | return retval; |
240 | } | 240 | } |
241 | 241 | ||
242 | static struct file_operations lcd_fops = { | 242 | static const struct file_operations lcd_fops = { |
243 | .owner = THIS_MODULE, | 243 | .owner = THIS_MODULE, |
244 | .read = lcd_read, | 244 | .read = lcd_read, |
245 | .write = lcd_write, | 245 | .write = lcd_write, |
@@ -290,9 +290,7 @@ static int lcd_probe(struct usb_interface *interface, const struct usb_device_id | |||
290 | endpoint = &iface_desc->endpoint[i].desc; | 290 | endpoint = &iface_desc->endpoint[i].desc; |
291 | 291 | ||
292 | if (!dev->bulk_in_endpointAddr && | 292 | if (!dev->bulk_in_endpointAddr && |
293 | (endpoint->bEndpointAddress & USB_DIR_IN) && | 293 | usb_endpoint_is_bulk_in(endpoint)) { |
294 | ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) | ||
295 | == USB_ENDPOINT_XFER_BULK)) { | ||
296 | /* we found a bulk in endpoint */ | 294 | /* we found a bulk in endpoint */ |
297 | buffer_size = le16_to_cpu(endpoint->wMaxPacketSize); | 295 | buffer_size = le16_to_cpu(endpoint->wMaxPacketSize); |
298 | dev->bulk_in_size = buffer_size; | 296 | dev->bulk_in_size = buffer_size; |
@@ -305,9 +303,7 @@ static int lcd_probe(struct usb_interface *interface, const struct usb_device_id | |||
305 | } | 303 | } |
306 | 304 | ||
307 | if (!dev->bulk_out_endpointAddr && | 305 | if (!dev->bulk_out_endpointAddr && |
308 | !(endpoint->bEndpointAddress & USB_DIR_IN) && | 306 | usb_endpoint_is_bulk_out(endpoint)) { |
309 | ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) | ||
310 | == USB_ENDPOINT_XFER_BULK)) { | ||
311 | /* we found a bulk out endpoint */ | 307 | /* we found a bulk out endpoint */ |
312 | dev->bulk_out_endpointAddr = endpoint->bEndpointAddress; | 308 | dev->bulk_out_endpointAddr = endpoint->bEndpointAddress; |
313 | } | 309 | } |