]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/cx25840/cx25840-core.h
V4L/DVB (10251): cx25840: add comments explaining what the init() does.
[linux-2.6-omap-h63xx.git] / drivers / media / video / cx25840 / cx25840-core.h
index b87337e590b43334a3b4b345ede4199ea5ae1924..be0558277ca336567c8bf66771aa7fb5711d5d57 100644 (file)
@@ -22,6 +22,7 @@
 
 
 #include <linux/videodev2.h>
+#include <media/v4l2-device.h>
 #include <linux/i2c.h>
 
 /* ENABLE_PVR150_WORKAROUND activates a workaround for a hardware bug that is
@@ -34,6 +35,7 @@
 
 struct cx25840_state {
        struct i2c_client *c;
+       struct v4l2_subdev sd;
        int pvr150_workaround;
        int radio;
        v4l2_std_id std;
@@ -53,6 +55,11 @@ struct cx25840_state {
        struct work_struct fw_work;   /* work entry for fw load */
 };
 
+static inline struct cx25840_state *to_state(struct v4l2_subdev *sd)
+{
+       return container_of(sd, struct cx25840_state, sd);
+}
+
 /* ----------------------------------------------------------------------- */
 /* cx25850-core.c                                                         */
 int cx25840_write(struct i2c_client *client, u16 addr, u8 value);