diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-08-23 15:37:49 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-09 21:14:55 -0400 |
commit | c1accaa21bdef38ec0f36eaaf7ce3384fff9d0c5 (patch) | |
tree | 3a2c8206555af6c9e2eecdb20b052be70e6b93dd /drivers/media/video/bt8xx/bttv-driver.c | |
parent | 7a7d9a89d0307b1743d782197e2c5fc5ddf183f3 (diff) |
V4L/DVB (6252): Adapt drivers to use the newer videobuf modules
PCI-dependent videobuf_foo methods were renamed as videobuf_pci_foo.
Also, videobuf_dmabuf is now part of videobuf-dma-sg private struct.
So, to access it, a subroutine call is needed.
This patch renames all occurences of those function calls to be
consistent with the video-buf split.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
http://thread.gmane.org/gmane.comp.video.video4linux/34978/focus=34981
Reviewed-by: Ricardo Cerqueira <v4l@cerqueira.org>
Diffstat (limited to 'drivers/media/video/bt8xx/bttv-driver.c')
-rw-r--r-- | drivers/media/video/bt8xx/bttv-driver.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index 0711c9507843..4ab4e14b5c64 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media/video/bt8xx/bttv-driver.c | |||
@@ -2582,7 +2582,7 @@ static int setup_window(struct bttv_fh *fh, struct bttv *btv, | |||
2582 | if (check_btres(fh, RESOURCE_OVERLAY)) { | 2582 | if (check_btres(fh, RESOURCE_OVERLAY)) { |
2583 | struct bttv_buffer *new; | 2583 | struct bttv_buffer *new; |
2584 | 2584 | ||
2585 | new = videobuf_alloc(sizeof(*new)); | 2585 | new = videobuf_pci_alloc(sizeof(*new)); |
2586 | new->crop = btv->crop[!!fh->do_crop].rect; | 2586 | new->crop = btv->crop[!!fh->do_crop].rect; |
2587 | bttv_overlay_risc(btv, &fh->ov, fh->ovfmt, new); | 2587 | bttv_overlay_risc(btv, &fh->ov, fh->ovfmt, new); |
2588 | retval = bttv_switch_overlay(btv,fh,new); | 2588 | retval = bttv_switch_overlay(btv,fh,new); |
@@ -3048,7 +3048,7 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file, | |||
3048 | mutex_lock(&fh->cap.lock); | 3048 | mutex_lock(&fh->cap.lock); |
3049 | if (*on) { | 3049 | if (*on) { |
3050 | fh->ov.tvnorm = btv->tvnorm; | 3050 | fh->ov.tvnorm = btv->tvnorm; |
3051 | new = videobuf_alloc(sizeof(*new)); | 3051 | new = videobuf_pci_alloc(sizeof(*new)); |
3052 | new->crop = btv->crop[!!fh->do_crop].rect; | 3052 | new->crop = btv->crop[!!fh->do_crop].rect; |
3053 | bttv_overlay_risc(btv, &fh->ov, fh->ovfmt, new); | 3053 | bttv_overlay_risc(btv, &fh->ov, fh->ovfmt, new); |
3054 | } else { | 3054 | } else { |
@@ -3141,9 +3141,12 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file, | |||
3141 | retval = -EIO; | 3141 | retval = -EIO; |
3142 | /* fall through */ | 3142 | /* fall through */ |
3143 | case STATE_DONE: | 3143 | case STATE_DONE: |
3144 | videobuf_dma_sync(&fh->cap,&buf->vb.dma); | 3144 | { |
3145 | struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb); | ||
3146 | videobuf_dma_sync(&fh->cap,dma); | ||
3145 | bttv_dma_free(&fh->cap,btv,buf); | 3147 | bttv_dma_free(&fh->cap,btv,buf); |
3146 | break; | 3148 | break; |
3149 | } | ||
3147 | default: | 3150 | default: |
3148 | retval = -EINVAL; | 3151 | retval = -EINVAL; |
3149 | break; | 3152 | break; |
@@ -3337,7 +3340,7 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file, | |||
3337 | if (check_btres(fh, RESOURCE_OVERLAY)) { | 3340 | if (check_btres(fh, RESOURCE_OVERLAY)) { |
3338 | struct bttv_buffer *new; | 3341 | struct bttv_buffer *new; |
3339 | 3342 | ||
3340 | new = videobuf_alloc(sizeof(*new)); | 3343 | new = videobuf_pci_alloc(sizeof(*new)); |
3341 | new->crop = btv->crop[!!fh->do_crop].rect; | 3344 | new->crop = btv->crop[!!fh->do_crop].rect; |
3342 | bttv_overlay_risc(btv,&fh->ov,fh->ovfmt,new); | 3345 | bttv_overlay_risc(btv,&fh->ov,fh->ovfmt,new); |
3343 | retval = bttv_switch_overlay(btv,fh,new); | 3346 | retval = bttv_switch_overlay(btv,fh,new); |
@@ -3696,7 +3699,7 @@ static unsigned int bttv_poll(struct file *file, poll_table *wait) | |||
3696 | mutex_unlock(&fh->cap.lock); | 3699 | mutex_unlock(&fh->cap.lock); |
3697 | return POLLERR; | 3700 | return POLLERR; |
3698 | } | 3701 | } |
3699 | fh->cap.read_buf = videobuf_alloc(fh->cap.msize); | 3702 | fh->cap.read_buf = videobuf_pci_alloc(fh->cap.msize); |
3700 | if (NULL == fh->cap.read_buf) { | 3703 | if (NULL == fh->cap.read_buf) { |
3701 | mutex_unlock(&fh->cap.lock); | 3704 | mutex_unlock(&fh->cap.lock); |
3702 | return POLLERR; | 3705 | return POLLERR; |
@@ -3763,13 +3766,13 @@ static int bttv_open(struct inode *inode, struct file *file) | |||
3763 | fh->ov.setup_ok = 0; | 3766 | fh->ov.setup_ok = 0; |
3764 | v4l2_prio_open(&btv->prio,&fh->prio); | 3767 | v4l2_prio_open(&btv->prio,&fh->prio); |
3765 | 3768 | ||
3766 | videobuf_queue_init(&fh->cap, &bttv_video_qops, | 3769 | videobuf_queue_pci_init(&fh->cap, &bttv_video_qops, |
3767 | btv->c.pci, &btv->s_lock, | 3770 | btv->c.pci, &btv->s_lock, |
3768 | V4L2_BUF_TYPE_VIDEO_CAPTURE, | 3771 | V4L2_BUF_TYPE_VIDEO_CAPTURE, |
3769 | V4L2_FIELD_INTERLACED, | 3772 | V4L2_FIELD_INTERLACED, |
3770 | sizeof(struct bttv_buffer), | 3773 | sizeof(struct bttv_buffer), |
3771 | fh); | 3774 | fh); |
3772 | videobuf_queue_init(&fh->vbi, &bttv_vbi_qops, | 3775 | videobuf_queue_pci_init(&fh->vbi, &bttv_vbi_qops, |
3773 | btv->c.pci, &btv->s_lock, | 3776 | btv->c.pci, &btv->s_lock, |
3774 | V4L2_BUF_TYPE_VBI_CAPTURE, | 3777 | V4L2_BUF_TYPE_VBI_CAPTURE, |
3775 | V4L2_FIELD_SEQ_TB, | 3778 | V4L2_FIELD_SEQ_TB, |