Skip to content

Commit 87df33b

Browse files
deborahbrouwermchehab
authored andcommitted
media: bttv: remove tvnorm field from bttv_buffer
Instead of storing the tvnorm in each bttv buffer separately, just use the global bttv tvnorm because the tvnorm does not change per buffer. Signed-off-by: Deborah Brouwer <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
1 parent 9764252 commit 87df33b

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

drivers/media/pci/bt8xx/bttv-driver.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1553,15 +1553,15 @@ static int bttv_prepare_buffer(struct videobuf_queue *q,struct bttv *btv,
15531553
/* alloc + fill struct bttv_buffer (if changed) */
15541554
if (buf->vb.width != width || buf->vb.height != height ||
15551555
buf->vb.field != field ||
1556-
buf->tvnorm != norm || btv->fmt != fmt ||
1556+
btv->tvnorm != norm || btv->fmt != fmt ||
15571557
buf->crop.top != c.rect.top ||
15581558
buf->crop.left != c.rect.left ||
15591559
buf->crop.width != c.rect.width ||
15601560
buf->crop.height != c.rect.height) {
15611561
buf->vb.width = width;
15621562
buf->vb.height = height;
15631563
buf->vb.field = field;
1564-
buf->tvnorm = norm;
1564+
btv->tvnorm = norm;
15651565
buf->crop = c.rect;
15661566
redo_dma_risc = 1;
15671567
}

drivers/media/pci/bt8xx/bttv-risc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ bttv_buffer_activate_video(struct bttv *btv,
606606
int
607607
bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf)
608608
{
609-
const struct bttv_tvnorm *tvnorm = bttv_tvnorms + buf->tvnorm;
609+
const struct bttv_tvnorm *tvnorm = bttv_tvnorms + btv->tvnorm;
610610
struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb);
611611

612612
dprintk("%d: buffer field: %s format: 0x%08x size: %dx%d\n",

drivers/media/pci/bt8xx/bttvp.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ struct bttv_buffer {
145145
struct videobuf_buffer vb;
146146

147147
/* bttv specific */
148-
unsigned int tvnorm;
149148
int btformat;
150149
int btswap;
151150
struct bttv_geometry geo;

0 commit comments

Comments
 (0)