Merge to kernel-2.6.20-1.2949.fc6.vs2.2.0.1
[linux-2.6.git] / drivers / media / video / ov511.h
similarity index 97%
rename from drivers/usb/media/ov511.h
rename to drivers/media/video/ov511.h
index 086509a..68b082b 100644 (file)
@@ -3,8 +3,10 @@
 
 #include <asm/uaccess.h>
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 #include <linux/smp_lock.h>
 #include <linux/usb.h>
+#include <linux/mutex.h>
 
 #define OV511_DEBUG    /* Turn on debug messages */
 
 #define R511_COMP_QVY          0x76
 #define R511_COMP_QVUV         0x77
 #define R511_COMP_EN           0x78
-#define R511_COMP_LUT_EN       0x79            
+#define R511_COMP_LUT_EN       0x79
 #define R511_COMP_LUT_BEGIN    0x80
 
 /* --------------------------------- */
@@ -435,7 +437,7 @@ struct usb_ov511 {
 
        int led_policy;         /* LED: off|on|auto; OV511+ only */
 
-       struct semaphore lock;  /* Serializes user-accessible operations */
+       struct mutex lock;      /* Serializes user-accessible operations */
        int user;               /* user count for exclusive use */
 
        int streaming;          /* Are we streaming Isochronous? */
@@ -458,14 +460,14 @@ struct usb_ov511 {
        int subh;               /* Pix Array subcapture height */
 
        int curframe;           /* Current receiving sbuf */
-       struct ov511_frame frame[OV511_NUMFRAMES];      
+       struct ov511_frame frame[OV511_NUMFRAMES];
 
        struct ov511_sbuf sbuf[OV511_NUMSBUF];
 
        wait_queue_head_t wq;   /* Processes waiting */
 
        int snap_enabled;       /* Snapshot mode enabled */
-       
+
        int bridge;             /* Type of bridge (BRG_*) */
        int bclass;             /* Class of bridge (BCL_*) */
        int sensor;             /* Type of image sensor chip (SEN_*) */
@@ -473,11 +475,9 @@ struct usb_ov511 {
        int packet_size;        /* Frame size per isoc desc */
        int packet_numbering;   /* Is ISO frame numbering enabled? */
 
-       struct semaphore param_lock;    /* params lock for this camera */
-
        /* Framebuffer/sbuf management */
        int buf_state;
-       struct semaphore buf_lock;
+       struct mutex buf_lock;
 
        struct ov51x_decomp_ops *decomp_ops;
 
@@ -494,12 +494,12 @@ struct usb_ov511 {
        int pal;                /* Device is designed for PAL resolution */
 
        /* I2C interface */
-       struct semaphore i2c_lock;        /* Protect I2C controller regs */
+       struct mutex i2c_lock;    /* Protect I2C controller regs */
        unsigned char primary_i2c_slave;  /* I2C write id of sensor */
 
        /* Control transaction stuff */
        unsigned char *cbuf;            /* Buffer for payload */
-       struct semaphore cbuf_lock;
+       struct mutex cbuf_lock;
 };
 
 /* Used to represent a list of values and their respective symbolic names */
@@ -513,7 +513,7 @@ struct symbolic_list {
 /* Returns the name of the matching element in the symbolic_list array. The
  * end of the list must be marked with an element that has a NULL name.
  */
-static inline char * 
+static inline char *
 symbolic(struct symbolic_list list[], int num)
 {
        int i;