diff options
author | Arjan van de Ven <arjan@infradead.org> | 2006-01-11 09:55:29 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-20 17:49:55 -0500 |
commit | 4186ecf8ad16dd05759a09594de6a87e48759ba6 (patch) | |
tree | 3ee5292d9f4a36e3eb359b586289ec972bcbaf39 /drivers/usb/media/ov511.h | |
parent | 35cce732d9d4d9af6b4ad4d26d8f8c0eddb573a2 (diff) |
[PATCH] USB: convert a bunch of USB semaphores to mutexes
the patch below converts a bunch of semaphores-used-as-mutex in the USB
code to mutexes
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/media/ov511.h')
-rw-r--r-- | drivers/usb/media/ov511.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/usb/media/ov511.h b/drivers/usb/media/ov511.h index 086509a137c6..bce9b3633889 100644 --- a/drivers/usb/media/ov511.h +++ b/drivers/usb/media/ov511.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/videodev.h> | 5 | #include <linux/videodev.h> |
6 | #include <linux/smp_lock.h> | 6 | #include <linux/smp_lock.h> |
7 | #include <linux/usb.h> | 7 | #include <linux/usb.h> |
8 | #include <linux/mutex.h> | ||
8 | 9 | ||
9 | #define OV511_DEBUG /* Turn on debug messages */ | 10 | #define OV511_DEBUG /* Turn on debug messages */ |
10 | 11 | ||
@@ -435,7 +436,7 @@ struct usb_ov511 { | |||
435 | 436 | ||
436 | int led_policy; /* LED: off|on|auto; OV511+ only */ | 437 | int led_policy; /* LED: off|on|auto; OV511+ only */ |
437 | 438 | ||
438 | struct semaphore lock; /* Serializes user-accessible operations */ | 439 | struct mutex lock; /* Serializes user-accessible operations */ |
439 | int user; /* user count for exclusive use */ | 440 | int user; /* user count for exclusive use */ |
440 | 441 | ||
441 | int streaming; /* Are we streaming Isochronous? */ | 442 | int streaming; /* Are we streaming Isochronous? */ |
@@ -473,11 +474,9 @@ struct usb_ov511 { | |||
473 | int packet_size; /* Frame size per isoc desc */ | 474 | int packet_size; /* Frame size per isoc desc */ |
474 | int packet_numbering; /* Is ISO frame numbering enabled? */ | 475 | int packet_numbering; /* Is ISO frame numbering enabled? */ |
475 | 476 | ||
476 | struct semaphore param_lock; /* params lock for this camera */ | ||
477 | |||
478 | /* Framebuffer/sbuf management */ | 477 | /* Framebuffer/sbuf management */ |
479 | int buf_state; | 478 | int buf_state; |
480 | struct semaphore buf_lock; | 479 | struct mutex buf_lock; |
481 | 480 | ||
482 | struct ov51x_decomp_ops *decomp_ops; | 481 | struct ov51x_decomp_ops *decomp_ops; |
483 | 482 | ||
@@ -494,12 +493,12 @@ struct usb_ov511 { | |||
494 | int pal; /* Device is designed for PAL resolution */ | 493 | int pal; /* Device is designed for PAL resolution */ |
495 | 494 | ||
496 | /* I2C interface */ | 495 | /* I2C interface */ |
497 | struct semaphore i2c_lock; /* Protect I2C controller regs */ | 496 | struct mutex i2c_lock; /* Protect I2C controller regs */ |
498 | unsigned char primary_i2c_slave; /* I2C write id of sensor */ | 497 | unsigned char primary_i2c_slave; /* I2C write id of sensor */ |
499 | 498 | ||
500 | /* Control transaction stuff */ | 499 | /* Control transaction stuff */ |
501 | unsigned char *cbuf; /* Buffer for payload */ | 500 | unsigned char *cbuf; /* Buffer for payload */ |
502 | struct semaphore cbuf_lock; | 501 | struct mutex cbuf_lock; |
503 | }; | 502 | }; |
504 | 503 | ||
505 | /* Used to represent a list of values and their respective symbolic names */ | 504 | /* Used to represent a list of values and their respective symbolic names */ |