aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common/saa7146_fops.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2010-03-24 19:09:55 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-06 19:20:50 -0300
commit03b1930efd3c2320b1dcba76c8af15f7e454919d (patch)
tree436dfae66ed4444578bc7d14cc43600a4f5119e1 /drivers/media/common/saa7146_fops.c
parentd2f2d6d0a11e892263ea511e46af449113fd2081 (diff)
downloadkernel_samsung_smdk4412-03b1930efd3c2320b1dcba76c8af15f7e454919d.zip
kernel_samsung_smdk4412-03b1930efd3c2320b1dcba76c8af15f7e454919d.tar.gz
kernel_samsung_smdk4412-03b1930efd3c2320b1dcba76c8af15f7e454919d.tar.bz2
V4L/DVB: saa7146: fix regression of the av7110/budget-av driver
An earlier regression fix for the mxb driver (V4L/DVB: saa7146_vv: fix regression where v4l2_device was registered too late) caused a new regression in the av7110 driver. Reverted the old fix and fixed the problem in the mxb driver instead. Tested on mxb and budget-av cards. The real problem is that the saa7146 framework has separate probe() and attach() driver callbacks which should be rolled into one. This is now done for the mxb driver, but others should do the same. Lack of hardware makes this hard to do, though. I hope to get hold of some hexium cards and then I can try to improve the framework to prevent this from happening again. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common/saa7146_fops.c')
-rw-r--r--drivers/media/common/saa7146_fops.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/media/common/saa7146_fops.c b/drivers/media/common/saa7146_fops.c
index fd8e1f4..7364b96 100644
--- a/drivers/media/common/saa7146_fops.c
+++ b/drivers/media/common/saa7146_fops.c
@@ -423,15 +423,14 @@ static void vv_callback(struct saa7146_dev *dev, unsigned long status)
}
}
-int saa7146_vv_devinit(struct saa7146_dev *dev)
-{
- return v4l2_device_register(&dev->pci->dev, &dev->v4l2_dev);
-}
-EXPORT_SYMBOL_GPL(saa7146_vv_devinit);
-
int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv)
{
struct saa7146_vv *vv;
+ int err;
+
+ err = v4l2_device_register(&dev->pci->dev, &dev->v4l2_dev);
+ if (err)
+ return err;
vv = kzalloc(sizeof(struct saa7146_vv), GFP_KERNEL);
if (vv == NULL) {