diff options
Diffstat (limited to 'linux/drivers/media/video/cx25840/cx25840-core.h')
-rw-r--r-- | linux/drivers/media/video/cx25840/cx25840-core.h | 7 |
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); |