Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190696
b: refs/heads/master
c: 03b1930
h: refs/heads/master
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed May 6, 2010
1 parent adcd281 commit bf37b82
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d2f2d6d0a11e892263ea511e46af449113fd2081
refs/heads/master: 03b1930efd3c2320b1dcba76c8af15f7e454919d
11 changes: 5 additions & 6 deletions trunk/drivers/media/common/saa7146_fops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/media/video/hexium_gemini.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,6 @@ static int hexium_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_d

DEB_EE((".\n"));

ret = saa7146_vv_devinit(dev);
if (ret)
return ret;
hexium = kzalloc(sizeof(struct hexium), GFP_KERNEL);
if (NULL == hexium) {
printk("hexium_gemini: not enough kernel memory in hexium_attach().\n");
Expand Down
4 changes: 0 additions & 4 deletions trunk/drivers/media/video/hexium_orion.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,6 @@ static int hexium_probe(struct saa7146_dev *dev)
return -EFAULT;
}

err = saa7146_vv_devinit(dev);
if (err)
return err;

hexium = kzalloc(sizeof(struct hexium), GFP_KERNEL);
if (NULL == hexium) {
printk("hexium_orion: hexium_probe: not enough kernel memory.\n");
Expand Down
17 changes: 8 additions & 9 deletions trunk/drivers/media/video/mxb.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,7 @@ 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"));
Expand Down Expand Up @@ -699,14 +695,17 @@ static struct saa7146_ext_vv vv_data;
/* this function only gets called when the probing was successful */
static int mxb_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_data *info)
{
struct mxb *mxb = (struct mxb *)dev->ext_priv;
struct mxb *mxb;

DEB_EE(("dev:%p\n", dev));

/* checking for i2c-devices can be omitted here, because we
already did this in "mxb_vl42_probe" */

saa7146_vv_init(dev, &vv_data);
if (mxb_probe(dev)) {
saa7146_vv_release(dev);
return -1;
}
mxb = (struct mxb *)dev->ext_priv;

vv_data.ops.vidioc_queryctrl = vidioc_queryctrl;
vv_data.ops.vidioc_g_ctrl = vidioc_g_ctrl;
vv_data.ops.vidioc_s_ctrl = vidioc_s_ctrl;
Expand All @@ -726,6 +725,7 @@ static int mxb_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_data
vv_data.ops.vidioc_default = vidioc_default;
if (saa7146_register_device(&mxb->video_dev, dev, "mxb", VFL_TYPE_GRABBER)) {
ERR(("cannot register capture v4l2 device. skipping.\n"));
saa7146_vv_release(dev);
return -1;
}

Expand Down Expand Up @@ -846,7 +846,6 @@ static struct saa7146_extension extension = {
.pci_tbl = &pci_tbl[0],
.module = THIS_MODULE,

.probe = mxb_probe,
.attach = mxb_attach,
.detach = mxb_detach,

Expand Down
1 change: 0 additions & 1 deletion trunk/include/media/saa7146_vv.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ void saa7146_buffer_timeout(unsigned long data);
void saa7146_dma_free(struct saa7146_dev* dev,struct videobuf_queue *q,
struct saa7146_buf *buf);

int saa7146_vv_devinit(struct saa7146_dev *dev);
int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv);
int saa7146_vv_release(struct saa7146_dev* dev);

Expand Down

0 comments on commit bf37b82

Please sign in to comment.