summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx25840/cx25840-core.h
diff options
context:
space:
mode:
authorErik Andrén <erik.andren@gmail.com>2008-12-26 11:58:34 +0100
committerErik Andrén <erik.andren@gmail.com>2008-12-26 11:58:34 +0100
commitda1d0789d659be9f1d2568351f2b9f3d81345aed (patch)
tree71e1067d4024c066f1b7b651205a9cbc222691da /linux/drivers/media/video/cx25840/cx25840-core.h
parentcbd16cf5e7e4aae60ca283ad27bafae1fcb21102 (diff)
parentac2c9fd519acfcea10f4b1b17b69e9f3d8f49555 (diff)
downloadmediapointer-dvb-s2-da1d0789d659be9f1d2568351f2b9f3d81345aed.tar.gz
mediapointer-dvb-s2-da1d0789d659be9f1d2568351f2b9f3d81345aed.tar.bz2
Merge with the main gspca tree.
From: Erik Andrén <erik.andren@gmail.com> Priority: normal Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Diffstat (limited to 'linux/drivers/media/video/cx25840/cx25840-core.h')
-rw-r--r--linux/drivers/media/video/cx25840/cx25840-core.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/linux/drivers/media/video/cx25840/cx25840-core.h b/linux/drivers/media/video/cx25840/cx25840-core.h
index cd549b119..0a99c19df 100644
--- a/linux/drivers/media/video/cx25840/cx25840-core.h
+++ b/linux/drivers/media/video/cx25840/cx25840-core.h
@@ -23,6 +23,7 @@
#include "compat.h"
#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
@@ -35,6 +36,7 @@
struct cx25840_state {
struct i2c_client *c;
+ struct v4l2_subdev sd;
int pvr150_workaround;
int radio;
v4l2_std_id std;
@@ -54,6 +56,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);