Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 193165
b: refs/heads/master
c: e8d0416
h: refs/heads/master
i:
  193163: 1ed9b9b
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed May 19, 2010
1 parent 11906e5 commit fbc28e0
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 29 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: 6b46c3977cdb34a199bbca20ef67b1e13335c43d
refs/heads/master: e8d0416796d43a950ec7b65629e53419b2e22453
1 change: 0 additions & 1 deletion trunk/drivers/staging/tm6000/tm6000-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,6 @@ static int tm6000_usb_probe(struct usb_interface *interface,
if ((card[nr] >= 0) && (card[nr] < ARRAY_SIZE(tm6000_boards)))
dev->model = card[nr];

INIT_LIST_HEAD(&dev->tm6000_corelist);
dev->udev = usbdev;
dev->devno = nr;

Expand Down
28 changes: 2 additions & 26 deletions trunk/drivers/staging/tm6000/tm6000-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ static struct tm6000_fmt format[] = {
}
};

static LIST_HEAD(tm6000_corelist);

/* ------------------------------------------------------------------
DMA and thread functions
------------------------------------------------------------------*/
Expand Down Expand Up @@ -1321,8 +1319,7 @@ static int tm6000_open(struct file *file)
struct video_device *vdev = video_devdata(file);
struct tm6000_core *dev = video_drvdata(file);
struct tm6000_fh *fh;
struct list_head *list;
enum v4l2_buf_type type = 0;
enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
int i,rc;

printk(KERN_INFO "tm6000: open called (dev=%s)\n",
Expand All @@ -1331,16 +1328,6 @@ static int tm6000_open(struct file *file)
dprintk(dev, V4L2_DEBUG_OPEN, "tm6000: open called (dev=%s)\n",
video_device_node_name(vdev));

list_for_each(list,&tm6000_corelist) {
h = list_entry(list, struct tm6000_core, tm6000_corelist);
if (h->vfd->minor == minor) {
dev = h;
type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
}
}
if (NULL == dev)
return -ENODEV;


/* If more than one user, mutex should be added */
dev->users++;
Expand Down Expand Up @@ -1533,15 +1520,14 @@ int tm6000_v4l2_register(struct tm6000_core *dev)
}
dev->vfd = vfd;

list_add_tail(&dev->tm6000_corelist,&tm6000_corelist);

/* init video dma queues */
INIT_LIST_HEAD(&dev->vidq.active);
INIT_LIST_HEAD(&dev->vidq.queued);

memcpy (dev->vfd, &tm6000_template, sizeof(*(dev->vfd)));
dev->vfd->debug=tm6000_debug;
vfd->v4l2_dev = &dev->v4l2_dev;
video_set_drvdata(vfd, dev);

ret = video_register_device(dev->vfd, VFL_TYPE_GRABBER, video_nr);
printk(KERN_INFO "Trident TVMaster TM5600/TM6000/TM6010 USB2 board (Load status: %d)\n", ret);
Expand All @@ -1550,18 +1536,8 @@ int tm6000_v4l2_register(struct tm6000_core *dev)

int tm6000_v4l2_unregister(struct tm6000_core *dev)
{
struct tm6000_core *h;
struct list_head *pos, *tmp;

video_unregister_device(dev->vfd);

list_for_each_safe(pos, tmp, &tm6000_corelist) {
h = list_entry(pos, struct tm6000_core, tm6000_corelist);
if (h == dev) {
list_del(pos);
}
}

return 0;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/staging/tm6000/tm6000.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ struct tm6000_core {
struct i2c_client i2c_client;

/* video for linux */
struct list_head tm6000_corelist;
int users;

/* various device info */
Expand Down

0 comments on commit fbc28e0

Please sign in to comment.