Merge to kernel-2.6.20-1.2949.fc6.vs2.2.0.1
[linux-2.6.git] / drivers / media / video / usbvideo / usbvideo.h
similarity index 96%
rename from drivers/usb/media/usbvideo.h
rename to drivers/media/video/usbvideo/usbvideo.h
index 6c390a1..051775d 100644 (file)
 #ifndef usbvideo_h
 #define        usbvideo_h
 
-#include <linux/config.h>
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 #include <linux/usb.h>
+#include <linux/mutex.h>
 
 /* Most helpful debugging aid */
 #define assert(expr) ((void) ((expr) ? 0 : (err("assert failed at line %d",__LINE__))))
@@ -188,11 +189,11 @@ struct usbvideo_frame {
 
 /* Statistics that can be overlaid on screen */
 struct usbvideo_statistics {
-        unsigned long frame_num;       /* Sequential number of the frame */
-        unsigned long urb_count;        /* How many URBs we received so far */
-        unsigned long urb_length;       /* Length of last URB */
-        unsigned long data_count;       /* How many bytes we received */
-        unsigned long header_count;     /* How many frame headers we found */
+       unsigned long frame_num;        /* Sequential number of the frame */
+       unsigned long urb_count;        /* How many URBs we received so far */
+       unsigned long urb_length;       /* Length of last URB */
+       unsigned long data_count;       /* How many bytes we received */
+       unsigned long header_count;     /* How many frame headers we found */
        unsigned long iso_skip_count;   /* How many empty ISO packets received */
        unsigned long iso_err_count;    /* How many bad ISO packets received */
 };
@@ -213,7 +214,7 @@ struct uvd {
        unsigned long flags;            /* FLAGS_USBVIDEO_xxx */
        unsigned long paletteBits;      /* Which palettes we accept? */
        unsigned short defaultPalette;  /* What palette to use for read() */
-       struct semaphore lock;
+       struct mutex lock;
        int user;               /* user count for exclusive use */
 
        videosize_t videosize;  /* Current setting */
@@ -272,7 +273,7 @@ struct usbvideo {
        int num_cameras;                /* As allocated */
        struct usb_driver usbdrv;       /* Interface to the USB stack */
        char drvName[80];               /* Driver name */
-       struct semaphore lock;          /* Mutex protecting camera structures */
+       struct mutex lock;              /* Mutex protecting camera structures */
        struct usbvideo_cb cb;          /* Table of callbacks (virtual methods) */
        struct video_device vdt;        /* Video device template */
        struct uvd *cam;                        /* Array of camera structures */