aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/bt8xx/bttv-driver.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@pengutronix.de>2008-04-22 13:42:13 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 13:07:44 -0400
commit0705135e59f8503e4dade4b3580fed77b1743b7c (patch)
tree9ab28abeff6cb8ffa50e565204ed4394524d28d7 /drivers/media/video/bt8xx/bttv-driver.c
parentf13613acfb1a71895ac886dc831d6ae4e20e241a (diff)
V4L/DVB (7237): Convert videobuf-dma-sg to generic DMA API
videobuf-dma-sg does not need to depend on PCI. Switch it to using generic DMA API, convert all affected drivers, relax Kconfig restriction, improve compile-time type checking, fix some Coding Style violations while at it. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/bt8xx/bttv-driver.c')
-rw-r--r--drivers/media/video/bt8xx/bttv-driver.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c
index fcf8f2d208a8..af2c0c994186 100644
--- a/drivers/media/video/bt8xx/bttv-driver.c
+++ b/drivers/media/video/bt8xx/bttv-driver.c
@@ -2372,7 +2372,7 @@ static int setup_window(struct bttv_fh *fh, struct bttv *btv,
2372 if (check_btres(fh, RESOURCE_OVERLAY)) { 2372 if (check_btres(fh, RESOURCE_OVERLAY)) {
2373 struct bttv_buffer *new; 2373 struct bttv_buffer *new;
2374 2374
2375 new = videobuf_pci_alloc(sizeof(*new)); 2375 new = videobuf_sg_alloc(sizeof(*new));
2376 new->crop = btv->crop[!!fh->do_crop].rect; 2376 new->crop = btv->crop[!!fh->do_crop].rect;
2377 bttv_overlay_risc(btv, &fh->ov, fh->ovfmt, new); 2377 bttv_overlay_risc(btv, &fh->ov, fh->ovfmt, new);
2378 retval = bttv_switch_overlay(btv,fh,new); 2378 retval = bttv_switch_overlay(btv,fh,new);
@@ -2760,7 +2760,7 @@ static int bttv_overlay(struct file *file, void *f, unsigned int on)
2760 mutex_lock(&fh->cap.vb_lock); 2760 mutex_lock(&fh->cap.vb_lock);
2761 if (on) { 2761 if (on) {
2762 fh->ov.tvnorm = btv->tvnorm; 2762 fh->ov.tvnorm = btv->tvnorm;
2763 new = videobuf_pci_alloc(sizeof(*new)); 2763 new = videobuf_sg_alloc(sizeof(*new));
2764 new->crop = btv->crop[!!fh->do_crop].rect; 2764 new->crop = btv->crop[!!fh->do_crop].rect;
2765 bttv_overlay_risc(btv, &fh->ov, fh->ovfmt, new); 2765 bttv_overlay_risc(btv, &fh->ov, fh->ovfmt, new);
2766 } else { 2766 } else {
@@ -2834,7 +2834,7 @@ static int bttv_s_fbuf(struct file *file, void *f,
2834 if (check_btres(fh, RESOURCE_OVERLAY)) { 2834 if (check_btres(fh, RESOURCE_OVERLAY)) {
2835 struct bttv_buffer *new; 2835 struct bttv_buffer *new;
2836 2836
2837 new = videobuf_pci_alloc(sizeof(*new)); 2837 new = videobuf_sg_alloc(sizeof(*new));
2838 new->crop = btv->crop[!!fh->do_crop].rect; 2838 new->crop = btv->crop[!!fh->do_crop].rect;
2839 bttv_overlay_risc(btv, &fh->ov, fh->ovfmt, new); 2839 bttv_overlay_risc(btv, &fh->ov, fh->ovfmt, new);
2840 retval = bttv_switch_overlay(btv, fh, new); 2840 retval = bttv_switch_overlay(btv, fh, new);
@@ -3184,7 +3184,7 @@ static unsigned int bttv_poll(struct file *file, poll_table *wait)
3184 /* need to capture a new frame */ 3184 /* need to capture a new frame */
3185 if (locked_btres(fh->btv,RESOURCE_VIDEO_STREAM)) 3185 if (locked_btres(fh->btv,RESOURCE_VIDEO_STREAM))
3186 goto err; 3186 goto err;
3187 fh->cap.read_buf = videobuf_pci_alloc(fh->cap.msize); 3187 fh->cap.read_buf = videobuf_sg_alloc(fh->cap.msize);
3188 if (NULL == fh->cap.read_buf) 3188 if (NULL == fh->cap.read_buf)
3189 goto err; 3189 goto err;
3190 fh->cap.read_buf->memory = V4L2_MEMORY_USERPTR; 3190 fh->cap.read_buf->memory = V4L2_MEMORY_USERPTR;
@@ -3251,14 +3251,14 @@ static int bttv_open(struct inode *inode, struct file *file)
3251 fh->ov.setup_ok = 0; 3251 fh->ov.setup_ok = 0;
3252 v4l2_prio_open(&btv->prio,&fh->prio); 3252 v4l2_prio_open(&btv->prio,&fh->prio);
3253 3253
3254 videobuf_queue_pci_init(&fh->cap, &bttv_video_qops, 3254 videobuf_queue_sg_init(&fh->cap, &bttv_video_qops,
3255 btv->c.pci, &btv->s_lock, 3255 &btv->c.pci->dev, &btv->s_lock,
3256 V4L2_BUF_TYPE_VIDEO_CAPTURE, 3256 V4L2_BUF_TYPE_VIDEO_CAPTURE,
3257 V4L2_FIELD_INTERLACED, 3257 V4L2_FIELD_INTERLACED,
3258 sizeof(struct bttv_buffer), 3258 sizeof(struct bttv_buffer),
3259 fh); 3259 fh);
3260 videobuf_queue_pci_init(&fh->vbi, &bttv_vbi_qops, 3260 videobuf_queue_sg_init(&fh->vbi, &bttv_vbi_qops,
3261 btv->c.pci, &btv->s_lock, 3261 &btv->c.pci->dev, &btv->s_lock,
3262 V4L2_BUF_TYPE_VBI_CAPTURE, 3262 V4L2_BUF_TYPE_VBI_CAPTURE,
3263 V4L2_FIELD_SEQ_TB, 3263 V4L2_FIELD_SEQ_TB,
3264 sizeof(struct bttv_buffer), 3264 sizeof(struct bttv_buffer),