diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/usb/usb-skeleton.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/usb/usb-skeleton.c')
-rw-r--r-- | drivers/usb/usb-skeleton.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c index b62f2bc064f6..61522787f39c 100644 --- a/drivers/usb/usb-skeleton.c +++ b/drivers/usb/usb-skeleton.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #define USB_SKEL_PRODUCT_ID 0xfff0 | 28 | #define USB_SKEL_PRODUCT_ID 0xfff0 |
29 | 29 | ||
30 | /* table of devices that work with this driver */ | 30 | /* table of devices that work with this driver */ |
31 | static struct usb_device_id skel_table[] = { | 31 | static const struct usb_device_id skel_table[] = { |
32 | { USB_DEVICE(USB_SKEL_VENDOR_ID, USB_SKEL_PRODUCT_ID) }, | 32 | { USB_DEVICE(USB_SKEL_VENDOR_ID, USB_SKEL_PRODUCT_ID) }, |
33 | { } /* Terminating entry */ | 33 | { } /* Terminating entry */ |
34 | }; | 34 | }; |
@@ -358,7 +358,7 @@ retry: | |||
358 | rv = skel_do_read_io(dev, count); | 358 | rv = skel_do_read_io(dev, count); |
359 | if (rv < 0) | 359 | if (rv < 0) |
360 | goto exit; | 360 | goto exit; |
361 | else if (!file->f_flags & O_NONBLOCK) | 361 | else if (!(file->f_flags & O_NONBLOCK)) |
362 | goto retry; | 362 | goto retry; |
363 | rv = -EAGAIN; | 363 | rv = -EAGAIN; |
364 | } | 364 | } |
@@ -411,7 +411,7 @@ static ssize_t skel_write(struct file *file, const char *user_buffer, | |||
411 | * limit the number of URBs in flight to stop a user from using up all | 411 | * limit the number of URBs in flight to stop a user from using up all |
412 | * RAM | 412 | * RAM |
413 | */ | 413 | */ |
414 | if (!file->f_flags & O_NONBLOCK) { | 414 | if (!(file->f_flags & O_NONBLOCK)) { |
415 | if (down_interruptible(&dev->limit_sem)) { | 415 | if (down_interruptible(&dev->limit_sem)) { |
416 | retval = -ERESTARTSYS; | 416 | retval = -ERESTARTSYS; |
417 | goto exit; | 417 | goto exit; |