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

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

diff -u --recursive --new-file v2.4.13/linux/drivers/media/video/cpia.h linux/drivers/media/video/cpia.h
@@ -416,6 +416,26 @@
   } while (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)