diff options
author | Mike Isely <isely@pobox.com> | 2009-01-16 03:06:02 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 12:42:23 -0300 |
commit | 2cc3b6bff46129374ee31236f804637278c5f323 (patch) | |
tree | a927d10d6f77bda3b6212291aaaf0a616685933f /drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c | |
parent | 8ed06fd4729d25959f6af8b7ce4e3888866bfe56 (diff) |
V4L/DVB (10258): pvrusb2: Issue VIDIOC_INT_INIT to v4l2 modules when they first attach
It appears that various v4l-dvb drivers are changing to require
explicit initialization before use. This change to the pvrusb2 driver
implements an automatic issuance of VIDIOC_INT_INIT when a module is
bound to the driver, thus conforming to the new behavior.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c index 16bb11902a5..0f2885440f2 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c +++ b/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c @@ -25,6 +25,20 @@ #include <linux/videodev2.h> #include <media/v4l2-common.h> +static void execute_init(struct pvr2_hdw *hdw) +{ + u32 dummy = 0; + pvr2_trace(PVR2_TRACE_CHIPS, "i2c v4l2 init"); + pvr2_i2c_core_cmd(hdw, VIDIOC_INT_INIT, &dummy); +} + + +const struct pvr2_i2c_op pvr2_i2c_op_v4l2_init = { + .update = execute_init, + .name = "v4l2_init", +}; + + static void set_standard(struct pvr2_hdw *hdw) { pvr2_trace(PVR2_TRACE_CHIPS,"i2c v4l2 set_standard"); |