patch-2.4.21 linux-2.4.21/drivers/media/video/cpia.h

Next file: linux-2.4.21/drivers/media/video/cpia_pp.c
Previous file: linux-2.4.21/drivers/media/video/cpia.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/drivers/media/video/cpia.h linux-2.4.21/drivers/media/video/cpia.h
@@ -27,12 +27,16 @@
  */
 
 #define CPIA_MAJ_VER	0
-#define CPIA_MIN_VER    8
-#define CPIA_PATCH_VER	1
+#define CPIA_MIN_VER   8
+#define CPIA_PATCH_VER	5
 
-#define CPIA_PP_MAJ_VER       0
-#define CPIA_PP_MIN_VER       8
-#define CPIA_PP_PATCH_VER     1
+#define CPIA_PP_MAJ_VER       CPIA_MAJ_VER
+#define CPIA_PP_MIN_VER       CPIA_MIN_VER
+#define CPIA_PP_PATCH_VER     CPIA_PATCH_VER
+
+#define CPIA_USB_MAJ_VER      CPIA_MAJ_VER
+#define CPIA_USB_MIN_VER      CPIA_MIN_VER
+#define CPIA_USB_PATCH_VER    CPIA_PATCH_VER
 
 #define CPIA_MAX_FRAME_SIZE_UNALIGNED	(352 * 288 * 4)   /* CIF at RGB32 */
 #define CPIA_MAX_FRAME_SIZE	((CPIA_MAX_FRAME_SIZE_UNALIGNED + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1)) /* align above to PAGE_SIZE */
@@ -41,6 +45,7 @@
 
 #include <asm/uaccess.h>
 #include <linux/videodev.h>
+#include <linux/list.h>
 #include <linux/smp_lock.h>
 
 struct cpia_camera_ops
@@ -93,6 +98,10 @@
 	 * is STREAM_READY before calling streamRead.
 	 */
 	int wait_for_stream_ready;
+	/*
+	 * Used to maintain lowlevel module usage counts
+	 */
+	struct module *owner;
 };
 
 struct cpia_frame {
@@ -233,8 +242,7 @@
 #define FRAME_NUM	2	/* double buffering for now */
 
 struct cam_data {
-	struct cam_data **previous;
-	struct cam_data *next;
+	struct list_head cam_data_list;
 
         struct semaphore busy_lock;     /* guard against SMP multithreading */
 	struct cpia_camera_ops *ops;	/* lowlevel driver operations */
@@ -400,24 +408,6 @@
       (p)&0x80?1:0, (p)&0x40?1:0, (p)&0x20?1:0, (p)&0x10?1:0,\
         (p)&0x08?1:0, (p)&0x04?1:0, (p)&0x02?1:0, (p)&0x01?1:0);
 
-static inline void cpia_add_to_list(struct cam_data* l, struct cam_data* drv)
-{
-	drv->next = l;
-	drv->previous = &l;
-	l = drv;
-}
-
-static inline void cpia_remove_from_list(struct cam_data* drv)
-{
-	if (drv->previous != NULL) {
-		if (drv->next != NULL)
-			drv->next->previous = drv->previous;
-		*(drv->previous) = drv->next;
-		drv->previous = NULL;
-		drv->next = NULL;
-	}
-}
-
 #endif /* __KERNEL__ */
 
 #endif /* cpia_h */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)