aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/mxb.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2010-02-20 07:56:25 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-02-26 15:11:05 -0300
commitcd7d9beb09d89d62bc3c6336e4cb9a2ee3da6163 (patch)
tree94ed5180b0cfac0f1f256bbb5ed9e0fb2643d93f /drivers/media/video/mxb.c
parentV4L/DVB: uvcvideo: Check uvc_ctrl_begin return value in VIDIOC_S_CTRL (diff)
downloadlinux-dev-cd7d9beb09d89d62bc3c6336e4cb9a2ee3da6163.tar.xz
linux-dev-cd7d9beb09d89d62bc3c6336e4cb9a2ee3da6163.zip
V4L/DVB: saa7146_vv: fix regression where v4l2_device was registered too late
v4l2_device_register needs to be called before the i2c subdevs are loaded. However, it was called afterwards in the saa7146 driver. This caused an oops when loading the mxb and hexium drivers. The vv_init function is now split into two: one registers the v4l2_device, the other does the rest of the initialization. The three drivers that depend on this have been updated to call the new vv_devinit function. Thanks to Michael Hunold for reporting this. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/mxb.c')
-rw-r--r--drivers/media/video/mxb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/video/mxb.c b/drivers/media/video/mxb.c
index c1fc6dc776f5..823f126b89cc 100644
--- a/drivers/media/video/mxb.c
+++ b/drivers/media/video/mxb.c
@@ -169,7 +169,11 @@ static struct saa7146_extension extension;
static int mxb_probe(struct saa7146_dev *dev)
{
struct mxb *mxb = NULL;
+ int err;
+ err = saa7146_vv_devinit(dev);
+ if (err)
+ return err;
mxb = kzalloc(sizeof(struct mxb), GFP_KERNEL);
if (mxb == NULL) {
DEB_D(("not enough kernel memory.\n"));