Commit 2169e6da authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

media: media/pci: don't set description for ENUM_FMT

The V4L2 core sets the description for the driver in order to ensure
consistent naming.

So drop the strscpy of the description in drivers. Also remove any
description strings in driver-internal structures since those are
no longer needed.
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 009cb7d5
...@@ -20,62 +20,52 @@ MODULE_PARM_DESC(max_memory, "maximum memory usage for capture buffers (default: ...@@ -20,62 +20,52 @@ MODULE_PARM_DESC(max_memory, "maximum memory usage for capture buffers (default:
/* format descriptions for capture and preview */ /* format descriptions for capture and preview */
static struct saa7146_format formats[] = { static struct saa7146_format formats[] = {
{ {
.name = "RGB-8 (3-3-2)",
.pixelformat = V4L2_PIX_FMT_RGB332, .pixelformat = V4L2_PIX_FMT_RGB332,
.trans = RGB08_COMPOSED, .trans = RGB08_COMPOSED,
.depth = 8, .depth = 8,
.flags = 0, .flags = 0,
}, { }, {
.name = "RGB-16 (5/B-6/G-5/R)",
.pixelformat = V4L2_PIX_FMT_RGB565, .pixelformat = V4L2_PIX_FMT_RGB565,
.trans = RGB16_COMPOSED, .trans = RGB16_COMPOSED,
.depth = 16, .depth = 16,
.flags = 0, .flags = 0,
}, { }, {
.name = "RGB-24 (B-G-R)",
.pixelformat = V4L2_PIX_FMT_BGR24, .pixelformat = V4L2_PIX_FMT_BGR24,
.trans = RGB24_COMPOSED, .trans = RGB24_COMPOSED,
.depth = 24, .depth = 24,
.flags = 0, .flags = 0,
}, { }, {
.name = "RGB-32 (B-G-R)",
.pixelformat = V4L2_PIX_FMT_BGR32, .pixelformat = V4L2_PIX_FMT_BGR32,
.trans = RGB32_COMPOSED, .trans = RGB32_COMPOSED,
.depth = 32, .depth = 32,
.flags = 0, .flags = 0,
}, { }, {
.name = "RGB-32 (R-G-B)",
.pixelformat = V4L2_PIX_FMT_RGB32, .pixelformat = V4L2_PIX_FMT_RGB32,
.trans = RGB32_COMPOSED, .trans = RGB32_COMPOSED,
.depth = 32, .depth = 32,
.flags = 0, .flags = 0,
.swap = 0x2, .swap = 0x2,
}, { }, {
.name = "Greyscale-8",
.pixelformat = V4L2_PIX_FMT_GREY, .pixelformat = V4L2_PIX_FMT_GREY,
.trans = Y8, .trans = Y8,
.depth = 8, .depth = 8,
.flags = 0, .flags = 0,
}, { }, {
.name = "YUV 4:2:2 planar (Y-Cb-Cr)",
.pixelformat = V4L2_PIX_FMT_YUV422P, .pixelformat = V4L2_PIX_FMT_YUV422P,
.trans = YUV422_DECOMPOSED, .trans = YUV422_DECOMPOSED,
.depth = 16, .depth = 16,
.flags = FORMAT_BYTE_SWAP|FORMAT_IS_PLANAR, .flags = FORMAT_BYTE_SWAP|FORMAT_IS_PLANAR,
}, { }, {
.name = "YVU 4:2:0 planar (Y-Cb-Cr)",
.pixelformat = V4L2_PIX_FMT_YVU420, .pixelformat = V4L2_PIX_FMT_YVU420,
.trans = YUV420_DECOMPOSED, .trans = YUV420_DECOMPOSED,
.depth = 12, .depth = 12,
.flags = FORMAT_BYTE_SWAP|FORMAT_IS_PLANAR, .flags = FORMAT_BYTE_SWAP|FORMAT_IS_PLANAR,
}, { }, {
.name = "YUV 4:2:0 planar (Y-Cb-Cr)",
.pixelformat = V4L2_PIX_FMT_YUV420, .pixelformat = V4L2_PIX_FMT_YUV420,
.trans = YUV420_DECOMPOSED, .trans = YUV420_DECOMPOSED,
.depth = 12, .depth = 12,
.flags = FORMAT_IS_PLANAR, .flags = FORMAT_IS_PLANAR,
}, { }, {
.name = "YUV 4:2:2 (U-Y-V-Y)",
.pixelformat = V4L2_PIX_FMT_UYVY, .pixelformat = V4L2_PIX_FMT_UYVY,
.trans = YUV422_COMPOSED, .trans = YUV422_COMPOSED,
.depth = 16, .depth = 16,
...@@ -147,10 +137,10 @@ int saa7146_start_preview(struct saa7146_fh *fh) ...@@ -147,10 +137,10 @@ int saa7146_start_preview(struct saa7146_fh *fh)
} }
vv->ov.win = fmt.fmt.win; vv->ov.win = fmt.fmt.win;
DEB_D("%dx%d+%d+%d %s field=%s\n", DEB_D("%dx%d+%d+%d 0x%08x field=%s\n",
vv->ov.win.w.width, vv->ov.win.w.height, vv->ov.win.w.width, vv->ov.win.w.height,
vv->ov.win.w.left, vv->ov.win.w.top, vv->ov.win.w.left, vv->ov.win.w.top,
vv->ov_fmt->name, v4l2_field_names[vv->ov.win.field]); vv->ov_fmt->pixelformat, v4l2_field_names[vv->ov.win.field]);
if (0 != (ret = saa7146_enable_overlay(fh))) { if (0 != (ret = saa7146_enable_overlay(fh))) {
DEB_D("enabling overlay failed: %d\n", ret); DEB_D("enabling overlay failed: %d\n", ret);
...@@ -515,8 +505,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *fh, struct v4l2_fmtd ...@@ -515,8 +505,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *fh, struct v4l2_fmtd
{ {
if (f->index >= ARRAY_SIZE(formats)) if (f->index >= ARRAY_SIZE(formats))
return -EINVAL; return -EINVAL;
strscpy((char *)f->description, formats[f->index].name,
sizeof(f->description));
f->pixelformat = formats[f->index].pixelformat; f->pixelformat = formats[f->index].pixelformat;
return 0; return 0;
} }
......
...@@ -503,77 +503,65 @@ static const unsigned int BTTV_TVNORMS = ARRAY_SIZE(bttv_tvnorms); ...@@ -503,77 +503,65 @@ static const unsigned int BTTV_TVNORMS = ARRAY_SIZE(bttv_tvnorms);
packed pixel formats must come first */ packed pixel formats must come first */
static const struct bttv_format formats[] = { static const struct bttv_format formats[] = {
{ {
.name = "8 bpp, gray",
.fourcc = V4L2_PIX_FMT_GREY, .fourcc = V4L2_PIX_FMT_GREY,
.btformat = BT848_COLOR_FMT_Y8, .btformat = BT848_COLOR_FMT_Y8,
.depth = 8, .depth = 8,
.flags = FORMAT_FLAGS_PACKED, .flags = FORMAT_FLAGS_PACKED,
},{ },{
.name = "8 bpp, dithered color",
.fourcc = V4L2_PIX_FMT_HI240, .fourcc = V4L2_PIX_FMT_HI240,
.btformat = BT848_COLOR_FMT_RGB8, .btformat = BT848_COLOR_FMT_RGB8,
.depth = 8, .depth = 8,
.flags = FORMAT_FLAGS_PACKED | FORMAT_FLAGS_DITHER, .flags = FORMAT_FLAGS_PACKED | FORMAT_FLAGS_DITHER,
},{ },{
.name = "15 bpp RGB, le",
.fourcc = V4L2_PIX_FMT_RGB555, .fourcc = V4L2_PIX_FMT_RGB555,
.btformat = BT848_COLOR_FMT_RGB15, .btformat = BT848_COLOR_FMT_RGB15,
.depth = 16, .depth = 16,
.flags = FORMAT_FLAGS_PACKED, .flags = FORMAT_FLAGS_PACKED,
},{ },{
.name = "15 bpp RGB, be",
.fourcc = V4L2_PIX_FMT_RGB555X, .fourcc = V4L2_PIX_FMT_RGB555X,
.btformat = BT848_COLOR_FMT_RGB15, .btformat = BT848_COLOR_FMT_RGB15,
.btswap = 0x03, /* byteswap */ .btswap = 0x03, /* byteswap */
.depth = 16, .depth = 16,
.flags = FORMAT_FLAGS_PACKED, .flags = FORMAT_FLAGS_PACKED,
},{ },{
.name = "16 bpp RGB, le",
.fourcc = V4L2_PIX_FMT_RGB565, .fourcc = V4L2_PIX_FMT_RGB565,
.btformat = BT848_COLOR_FMT_RGB16, .btformat = BT848_COLOR_FMT_RGB16,
.depth = 16, .depth = 16,
.flags = FORMAT_FLAGS_PACKED, .flags = FORMAT_FLAGS_PACKED,
},{ },{
.name = "16 bpp RGB, be",
.fourcc = V4L2_PIX_FMT_RGB565X, .fourcc = V4L2_PIX_FMT_RGB565X,
.btformat = BT848_COLOR_FMT_RGB16, .btformat = BT848_COLOR_FMT_RGB16,
.btswap = 0x03, /* byteswap */ .btswap = 0x03, /* byteswap */
.depth = 16, .depth = 16,
.flags = FORMAT_FLAGS_PACKED, .flags = FORMAT_FLAGS_PACKED,
},{ },{
.name = "24 bpp RGB, le",
.fourcc = V4L2_PIX_FMT_BGR24, .fourcc = V4L2_PIX_FMT_BGR24,
.btformat = BT848_COLOR_FMT_RGB24, .btformat = BT848_COLOR_FMT_RGB24,
.depth = 24, .depth = 24,
.flags = FORMAT_FLAGS_PACKED, .flags = FORMAT_FLAGS_PACKED,
},{ },{
.name = "32 bpp RGB, le",
.fourcc = V4L2_PIX_FMT_BGR32, .fourcc = V4L2_PIX_FMT_BGR32,
.btformat = BT848_COLOR_FMT_RGB32, .btformat = BT848_COLOR_FMT_RGB32,
.depth = 32, .depth = 32,
.flags = FORMAT_FLAGS_PACKED, .flags = FORMAT_FLAGS_PACKED,
},{ },{
.name = "32 bpp RGB, be",
.fourcc = V4L2_PIX_FMT_RGB32, .fourcc = V4L2_PIX_FMT_RGB32,
.btformat = BT848_COLOR_FMT_RGB32, .btformat = BT848_COLOR_FMT_RGB32,
.btswap = 0x0f, /* byte+word swap */ .btswap = 0x0f, /* byte+word swap */
.depth = 32, .depth = 32,
.flags = FORMAT_FLAGS_PACKED, .flags = FORMAT_FLAGS_PACKED,
},{ },{
.name = "4:2:2, packed, YUYV",
.fourcc = V4L2_PIX_FMT_YUYV, .fourcc = V4L2_PIX_FMT_YUYV,
.btformat = BT848_COLOR_FMT_YUY2, .btformat = BT848_COLOR_FMT_YUY2,
.depth = 16, .depth = 16,
.flags = FORMAT_FLAGS_PACKED, .flags = FORMAT_FLAGS_PACKED,
},{ },{
.name = "4:2:2, packed, UYVY",
.fourcc = V4L2_PIX_FMT_UYVY, .fourcc = V4L2_PIX_FMT_UYVY,
.btformat = BT848_COLOR_FMT_YUY2, .btformat = BT848_COLOR_FMT_YUY2,
.btswap = 0x03, /* byteswap */ .btswap = 0x03, /* byteswap */
.depth = 16, .depth = 16,
.flags = FORMAT_FLAGS_PACKED, .flags = FORMAT_FLAGS_PACKED,
},{ },{
.name = "4:2:2, planar, Y-Cb-Cr",
.fourcc = V4L2_PIX_FMT_YUV422P, .fourcc = V4L2_PIX_FMT_YUV422P,
.btformat = BT848_COLOR_FMT_YCrCb422, .btformat = BT848_COLOR_FMT_YCrCb422,
.depth = 16, .depth = 16,
...@@ -581,7 +569,6 @@ static const struct bttv_format formats[] = { ...@@ -581,7 +569,6 @@ static const struct bttv_format formats[] = {
.hshift = 1, .hshift = 1,
.vshift = 0, .vshift = 0,
},{ },{
.name = "4:2:0, planar, Y-Cb-Cr",
.fourcc = V4L2_PIX_FMT_YUV420, .fourcc = V4L2_PIX_FMT_YUV420,
.btformat = BT848_COLOR_FMT_YCrCb422, .btformat = BT848_COLOR_FMT_YCrCb422,
.depth = 12, .depth = 12,
...@@ -589,7 +576,6 @@ static const struct bttv_format formats[] = { ...@@ -589,7 +576,6 @@ static const struct bttv_format formats[] = {
.hshift = 1, .hshift = 1,
.vshift = 1, .vshift = 1,
},{ },{
.name = "4:2:0, planar, Y-Cr-Cb",
.fourcc = V4L2_PIX_FMT_YVU420, .fourcc = V4L2_PIX_FMT_YVU420,
.btformat = BT848_COLOR_FMT_YCrCb422, .btformat = BT848_COLOR_FMT_YCrCb422,
.depth = 12, .depth = 12,
...@@ -597,7 +583,6 @@ static const struct bttv_format formats[] = { ...@@ -597,7 +583,6 @@ static const struct bttv_format formats[] = {
.hshift = 1, .hshift = 1,
.vshift = 1, .vshift = 1,
},{ },{
.name = "4:1:1, planar, Y-Cb-Cr",
.fourcc = V4L2_PIX_FMT_YUV411P, .fourcc = V4L2_PIX_FMT_YUV411P,
.btformat = BT848_COLOR_FMT_YCrCb411, .btformat = BT848_COLOR_FMT_YCrCb411,
.depth = 12, .depth = 12,
...@@ -605,7 +590,6 @@ static const struct bttv_format formats[] = { ...@@ -605,7 +590,6 @@ static const struct bttv_format formats[] = {
.hshift = 2, .hshift = 2,
.vshift = 0, .vshift = 0,
},{ },{
.name = "4:1:0, planar, Y-Cb-Cr",
.fourcc = V4L2_PIX_FMT_YUV410, .fourcc = V4L2_PIX_FMT_YUV410,
.btformat = BT848_COLOR_FMT_YCrCb411, .btformat = BT848_COLOR_FMT_YCrCb411,
.depth = 9, .depth = 9,
...@@ -613,7 +597,6 @@ static const struct bttv_format formats[] = { ...@@ -613,7 +597,6 @@ static const struct bttv_format formats[] = {
.hshift = 2, .hshift = 2,
.vshift = 2, .vshift = 2,
},{ },{
.name = "4:1:0, planar, Y-Cr-Cb",
.fourcc = V4L2_PIX_FMT_YVU410, .fourcc = V4L2_PIX_FMT_YVU410,
.btformat = BT848_COLOR_FMT_YCrCb411, .btformat = BT848_COLOR_FMT_YCrCb411,
.depth = 9, .depth = 9,
...@@ -621,7 +604,6 @@ static const struct bttv_format formats[] = { ...@@ -621,7 +604,6 @@ static const struct bttv_format formats[] = {
.hshift = 2, .hshift = 2,
.vshift = 2, .vshift = 2,
},{ },{
.name = "raw scanlines",
.fourcc = -1, .fourcc = -1,
.btformat = BT848_COLOR_FMT_RAW, .btformat = BT848_COLOR_FMT_RAW,
.depth = 8, .depth = 8,
...@@ -2500,7 +2482,6 @@ static int bttv_enum_fmt_cap_ovr(struct v4l2_fmtdesc *f) ...@@ -2500,7 +2482,6 @@ static int bttv_enum_fmt_cap_ovr(struct v4l2_fmtdesc *f)
return -EINVAL; return -EINVAL;
f->pixelformat = formats[i].fourcc; f->pixelformat = formats[i].fourcc;
strscpy(f->description, formats[i].name, sizeof(f->description));
return i; return i;
} }
......
...@@ -699,9 +699,9 @@ bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf) ...@@ -699,9 +699,9 @@ bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf)
const struct bttv_tvnorm *tvnorm = bttv_tvnorms + buf->tvnorm; const struct bttv_tvnorm *tvnorm = bttv_tvnorms + buf->tvnorm;
struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb); struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb);
dprintk("%d: buffer field: %s format: %s size: %dx%d\n", dprintk("%d: buffer field: %s format: 0x%08x size: %dx%d\n",
btv->c.nr, v4l2_field_names[buf->vb.field], btv->c.nr, v4l2_field_names[buf->vb.field],
buf->fmt->name, buf->vb.width, buf->vb.height); buf->fmt->fourcc, buf->vb.width, buf->vb.height);
/* packed pixel modes */ /* packed pixel modes */
if (buf->fmt->flags & FORMAT_FLAGS_PACKED) { if (buf->fmt->flags & FORMAT_FLAGS_PACKED) {
...@@ -860,9 +860,9 @@ bttv_overlay_risc(struct bttv *btv, ...@@ -860,9 +860,9 @@ bttv_overlay_risc(struct bttv *btv,
struct bttv_buffer *buf) struct bttv_buffer *buf)
{ {
/* check interleave, bottom+top fields */ /* check interleave, bottom+top fields */
dprintk("%d: overlay fields: %s format: %s size: %dx%d\n", dprintk("%d: overlay fields: %s format: 0x%08x size: %dx%d\n",
btv->c.nr, v4l2_field_names[buf->vb.field], btv->c.nr, v4l2_field_names[buf->vb.field],
fmt->name, ov->w.width, ov->w.height); fmt->fourcc, ov->w.width, ov->w.height);
/* calculate geometry */ /* calculate geometry */
bttv_calc_geo(btv,&buf->geo,ov->w.width,ov->w.height, bttv_calc_geo(btv,&buf->geo,ov->w.width,ov->w.height,
......
...@@ -99,7 +99,6 @@ struct bttv_tvnorm { ...@@ -99,7 +99,6 @@ struct bttv_tvnorm {
extern const struct bttv_tvnorm bttv_tvnorms[]; extern const struct bttv_tvnorm bttv_tvnorms[];
struct bttv_format { struct bttv_format {
char *name;
int fourcc; /* video4linux 2 */ int fourcc; /* video4linux 2 */
int btformat; /* BT848_COLOR_FMT_* */ int btformat; /* BT848_COLOR_FMT_* */
int btswap; /* BT848_COLOR_CTL_* */ int btswap; /* BT848_COLOR_CTL_* */
......
...@@ -688,15 +688,12 @@ static int cobalt_enum_fmt_vid_cap(struct file *file, void *priv_fh, ...@@ -688,15 +688,12 @@ static int cobalt_enum_fmt_vid_cap(struct file *file, void *priv_fh,
{ {
switch (f->index) { switch (f->index) {
case 0: case 0:
strscpy(f->description, "YUV 4:2:2", sizeof(f->description));
f->pixelformat = V4L2_PIX_FMT_YUYV; f->pixelformat = V4L2_PIX_FMT_YUYV;
break; break;
case 1: case 1:
strscpy(f->description, "RGB24", sizeof(f->description));
f->pixelformat = V4L2_PIX_FMT_RGB24; f->pixelformat = V4L2_PIX_FMT_RGB24;
break; break;
case 2: case 2:
strscpy(f->description, "RGB32", sizeof(f->description));
f->pixelformat = V4L2_PIX_FMT_BGR32; f->pixelformat = V4L2_PIX_FMT_BGR32;
break; break;
default: default:
...@@ -893,11 +890,9 @@ static int cobalt_enum_fmt_vid_out(struct file *file, void *priv_fh, ...@@ -893,11 +890,9 @@ static int cobalt_enum_fmt_vid_out(struct file *file, void *priv_fh,
{ {
switch (f->index) { switch (f->index) {
case 0: case 0:
strscpy(f->description, "YUV 4:2:2", sizeof(f->description));
f->pixelformat = V4L2_PIX_FMT_YUYV; f->pixelformat = V4L2_PIX_FMT_YUYV;
break; break;
case 1: case 1:
strscpy(f->description, "RGB32", sizeof(f->description));
f->pixelformat = V4L2_PIX_FMT_BGR32; f->pixelformat = V4L2_PIX_FMT_BGR32;
break; break;
default: default:
......
...@@ -1339,7 +1339,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv, ...@@ -1339,7 +1339,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
if (f->index != 0) if (f->index != 0)
return -EINVAL; return -EINVAL;
strscpy(f->description, "MPEG", sizeof(f->description));
f->pixelformat = V4L2_PIX_FMT_MPEG; f->pixelformat = V4L2_PIX_FMT_MPEG;
return 0; return 0;
......
...@@ -67,7 +67,6 @@ MODULE_PARM_DESC(vid_limit, "capture memory limit in megabytes"); ...@@ -67,7 +67,6 @@ MODULE_PARM_DESC(vid_limit, "capture memory limit in megabytes");
#define FORMAT_FLAGS_PACKED 0x01 #define FORMAT_FLAGS_PACKED 0x01
static struct cx23885_fmt formats[] = { static struct cx23885_fmt formats[] = {
{ {
.name = "4:2:2, packed, YUYV",
.fourcc = V4L2_PIX_FMT_YUYV, .fourcc = V4L2_PIX_FMT_YUYV,
.depth = 16, .depth = 16,
.flags = FORMAT_FLAGS_PACKED, .flags = FORMAT_FLAGS_PACKED,
...@@ -411,9 +410,9 @@ static int buffer_prepare(struct vb2_buffer *vb) ...@@ -411,9 +410,9 @@ static int buffer_prepare(struct vb2_buffer *vb)
default: default:
BUG(); BUG();
} }
dprintk(2, "[%p/%d] buffer_init - %dx%d %dbpp \"%s\" - dma=0x%08lx\n", dprintk(2, "[%p/%d] buffer_init - %dx%d %dbpp 0x%08x - dma=0x%08lx\n",
buf, buf->vb.vb2_buf.index, buf, buf->vb.vb2_buf.index,
dev->width, dev->height, dev->fmt->depth, dev->fmt->name, dev->width, dev->height, dev->fmt->depth, dev->fmt->fourcc,
(unsigned long)buf->risc.dma); (unsigned long)buf->risc.dma);
return 0; return 0;
} }
...@@ -647,8 +646,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv, ...@@ -647,8 +646,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
if (unlikely(f->index >= ARRAY_SIZE(formats))) if (unlikely(f->index >= ARRAY_SIZE(formats)))
return -EINVAL; return -EINVAL;
strscpy(f->description, formats[f->index].name,
sizeof(f->description));
f->pixelformat = formats[f->index].fourcc; f->pixelformat = formats[f->index].fourcc;
return 0; return 0;
......
...@@ -127,7 +127,6 @@ ...@@ -127,7 +127,6 @@
V4L2_STD_PAL_60 | V4L2_STD_SECAM_L | V4L2_STD_SECAM_DK) V4L2_STD_PAL_60 | V4L2_STD_SECAM_L | V4L2_STD_SECAM_DK)
struct cx23885_fmt { struct cx23885_fmt {
char *name;
u32 fourcc; /* v4l2 format id */ u32 fourcc; /* v4l2 format id */
int depth; int depth;
int flags; int flags;
......
...@@ -35,12 +35,10 @@ MODULE_PARM_DESC(irq_debug, "enable debug messages [IRQ handler]"); ...@@ -35,12 +35,10 @@ MODULE_PARM_DESC(irq_debug, "enable debug messages [IRQ handler]");
static const struct cx25821_fmt formats[] = { static const struct cx25821_fmt formats[] = {
{ {
.name = "4:1:1, packed, Y41P",
.fourcc = V4L2_PIX_FMT_Y41P, .fourcc = V4L2_PIX_FMT_Y41P,
.depth = 12, .depth = 12,
.flags = FORMAT_FLAGS_PACKED, .flags = FORMAT_FLAGS_PACKED,
}, { }, {
.name = "4:2:2, packed, YUYV",
.fourcc = V4L2_PIX_FMT_YUYV, .fourcc = V4L2_PIX_FMT_YUYV,
.depth = 16, .depth = 16,
.flags = FORMAT_FLAGS_PACKED, .flags = FORMAT_FLAGS_PACKED,
...@@ -215,9 +213,9 @@ static int cx25821_buffer_prepare(struct vb2_buffer *vb) ...@@ -215,9 +213,9 @@ static int cx25821_buffer_prepare(struct vb2_buffer *vb)
break; break;
} }
dprintk(2, "[%p/%d] buffer_prep - %dx%d %dbpp \"%s\" - dma=0x%08lx\n", dprintk(2, "[%p/%d] buffer_prep - %dx%d %dbpp 0x%08x - dma=0x%08lx\n",
buf, buf->vb.vb2_buf.index, chan->width, chan->height, buf, buf->vb.vb2_buf.index, chan->width, chan->height,
chan->fmt->depth, chan->fmt->name, chan->fmt->depth, chan->fmt->fourcc,
(unsigned long)buf->risc.dma); (unsigned long)buf->risc.dma);
return ret; return ret;
...@@ -311,7 +309,6 @@ static int cx25821_vidioc_enum_fmt_vid_cap(struct file *file, void *priv, ...@@ -311,7 +309,6 @@ static int cx25821_vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
if (unlikely(f->index >= ARRAY_SIZE(formats))) if (unlikely(f->index >= ARRAY_SIZE(formats)))
return -EINVAL; return -EINVAL;
strscpy(f->description, formats[f->index].name, sizeof(f->description));
f->pixelformat = formats[f->index].fourcc; f->pixelformat = formats[f->index].fourcc;
return 0; return 0;
......
...@@ -83,7 +83,6 @@ ...@@ -83,7 +83,6 @@
#define VID_CHANNEL_NUM 8 #define VID_CHANNEL_NUM 8
struct cx25821_fmt { struct cx25821_fmt {
char *name;
u32 fourcc; /* v4l2 format id */ u32 fourcc; /* v4l2 format id */
int depth; int depth;
int flags; int flags;
......
...@@ -805,9 +805,7 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv, ...@@ -805,9 +805,7 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
if (f->index != 0) if (f->index != 0)
return -EINVAL; return -EINVAL;
strscpy(f->description, "MPEG", sizeof(f->description));
f->pixelformat = V4L2_PIX_FMT_MPEG; f->pixelformat = V4L2_PIX_FMT_MPEG;
f->flags = V4L2_FMT_FLAG_COMPRESSED;
return 0; return 0;
} }
......
...@@ -69,62 +69,52 @@ MODULE_PARM_DESC(irq_debug, "enable debug messages [IRQ handler]"); ...@@ -69,62 +69,52 @@ MODULE_PARM_DESC(irq_debug, "enable debug messages [IRQ handler]");
static const struct cx8800_fmt formats[] = { static const struct cx8800_fmt formats[] = {
{ {
.name = "8 bpp, gray",
.fourcc = V4L2_PIX_FMT_GREY, .fourcc = V4L2_PIX_FMT_GREY,
.cxformat = ColorFormatY8, .cxformat = ColorFormatY8,
.depth = 8, .depth = 8,
.flags = FORMAT_FLAGS_PACKED, .flags = FORMAT_FLAGS_PACKED,
}, { }, {
.name = "15 bpp RGB, le",
.fourcc = V4L2_PIX_FMT_RGB555, .fourcc = V4L2_PIX_FMT_RGB555,
.cxformat = ColorFormatRGB15, .cxformat = ColorFormatRGB15,
.depth = 16, .depth = 16,
.flags = FORMAT_FLAGS_PACKED, .flags = FORMAT_FLAGS_PACKED,
}, { }, {
.name = "15 bpp RGB, be",
.fourcc = V4L2_PIX_FMT_RGB555X, .fourcc = V4L2_PIX_FMT_RGB555X,
.cxformat = ColorFormatRGB15 | ColorFormatBSWAP, .cxformat = ColorFormatRGB15 | ColorFormatBSWAP,
.depth = 16, .depth = 16,
.flags = FORMAT_FLAGS_PACKED, .flags = FORMAT_FLAGS_PACKED,
}, { }, {
.name = "16 bpp RGB, le",
.fourcc = V4L2_PIX_FMT_RGB565, .fourcc = V4L2_PIX_FMT_RGB565,
.cxformat = ColorFormatRGB16, .cxformat = ColorFormatRGB16,
.depth = 16, .depth = 16,
.flags = FORMAT_FLAGS_PACKED, .flags = FORMAT_FLAGS_PACKED,
}, { }, {
.name = "16 bpp RGB, be",
.fourcc = V4L2_PIX_FMT_RGB565X, .fourcc = V4L2_PIX_FMT_RGB565X,
.cxformat = ColorFormatRGB16 | ColorFormatBSWAP, .cxformat = ColorFormatRGB16 | ColorFormatBSWAP,
.depth = 16, .depth = 16,
.flags = FORMAT_FLAGS_PACKED, .flags = FORMAT_FLAGS_PACKED,
}, { }, {
.name = "24 bpp RGB, le",
.fourcc = V4L2_PIX_FMT_BGR24, .fourcc = V4L2_PIX_FMT_BGR24,
.cxformat = ColorFormatRGB24, .cxformat = ColorFormatRGB24,
.depth = 24, .depth = 24,
.flags = FORMAT_FLAGS_PACKED, .flags = FORMAT_FLAGS_PACKED,
}, { }, {
.name = "32 bpp RGB, le",
.fourcc = V4L2_PIX_FMT_BGR32, .fourcc = V4L2_PIX_FMT_BGR32,
.cxformat = ColorFormatRGB32, .cxformat = ColorFormatRGB32,
.depth = 32, .depth = 32,
.flags = FORMAT_FLAGS_PACKED, .flags = FORMAT_FLAGS_PACKED,
}, { }, {
.name = "32 bpp RGB, be",
.fourcc = V4L2_PIX_FMT_RGB32, .fourcc = V4L2_PIX_FMT_RGB32,
.cxformat = ColorFormatRGB32 | ColorFormatBSWAP | .cxformat = ColorFormatRGB32 | ColorFormatBSWAP |
ColorFormatWSWAP, ColorFormatWSWAP,
.depth = 32, .depth = 32,
.flags = FORMAT_FLAGS_PACKED, .flags = FORMAT_FLAGS_PACKED,
}, { }, {
.name = "4:2:2, packed, YUYV",
.fourcc = V4L2_PIX_FMT_YUYV, .fourcc = V4L2_PIX_FMT_YUYV,
.cxformat = ColorFormatYUY2, .cxformat = ColorFormatYUY2,
.depth = 16, .depth = 16,
.flags = FORMAT_FLAGS_PACKED, .flags = FORMAT_FLAGS_PACKED,
}, { }, {
.name = "4:2:2, packed, UYVY",
.fourcc = V4L2_PIX_FMT_UYVY, .fourcc = V4L2_PIX_FMT_UYVY,
.cxformat = ColorFormatYUY2 | ColorFormatBSWAP, .cxformat = ColorFormatYUY2 | ColorFormatBSWAP,
.depth = 16, .depth = 16,
...@@ -489,9 +479,9 @@ static int buffer_prepare(struct vb2_buffer *vb) ...@@ -489,9 +479,9 @@ static int buffer_prepare(struct vb2_buffer *vb)
break; break;
} }
dprintk(2, dprintk(2,
"[%p/%d] buffer_prepare - %dx%d %dbpp \"%s\" - dma=0x%08lx\n", "[%p/%d] %s - %dx%d %dbpp 0x%08x - dma=0x%08lx\n",
buf, buf->vb.vb2_buf.index, buf, buf->vb.vb2_buf.index, __func__,
core->width, core->height, dev->fmt->depth, dev->fmt->name, core->width, core->height, dev->fmt->depth, dev->fmt->fourcc,
(unsigned long)buf->risc.dma); (unsigned long)buf->risc.dma);
return 0; return 0;
} }
...@@ -829,7 +819,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv, ...@@ -829,7 +819,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
if (unlikely(f->index >= ARRAY_SIZE(formats))) if (unlikely(f->index >= ARRAY_SIZE(formats)))
return -EINVAL; return -EINVAL;
strscpy(f->description, formats[f->index].name, sizeof(f->description));
f->pixelformat = formats[f->index].fourcc; f->pixelformat = formats[f->index].fourcc;
return 0; return 0;
......
...@@ -99,7 +99,6 @@ static inline unsigned int norm_maxh(v4l2_std_id norm) ...@@ -99,7 +99,6 @@ static inline unsigned int norm_maxh(v4l2_std_id norm)
/* static data */ /* static data */
struct cx8800_fmt { struct cx8800_fmt {
const char *name;
u32 fourcc; /* v4l2 format id */ u32 fourcc; /* v4l2 format id */
int depth; int depth;
int flags; int flags;
......
...@@ -306,7 +306,6 @@ static int dt3155_enum_fmt_vid_cap(struct file *filp, ...@@ -306,7 +306,6 @@ static int dt3155_enum_fmt_vid_cap(struct file *filp,
if (f->index) if (f->index)
return -EINVAL; return -EINVAL;
f->pixelformat = V4L2_PIX_FMT_GREY; f->pixelformat = V4L2_PIX_FMT_GREY;
strscpy(f->description, "8-bit Greyscale", sizeof(f->description));
return 0; return 0;
} }
......
...@@ -1104,12 +1104,9 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *fh, ...@@ -1104,12 +1104,9 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *fh,
if (f->index == 0) { if (f->index == 0) {
/* standard YUV 422 capture */ /* standard YUV 422 capture */
f->flags = 0; f->flags = 0;
strscpy(f->description, "YUV422", sizeof(f->description));
f->pixelformat = V4L2_PIX_FMT_YUYV; f->pixelformat = V4L2_PIX_FMT_YUYV;
} else { } else {
/* compressed MJPEG capture */ /* compressed MJPEG capture */
f->flags = V4L2_FMT_FLAG_COMPRESSED;
strscpy(f->description, "MJPEG", sizeof(f->description));
f->pixelformat = V4L2_PIX_FMT_MJPEG; f->pixelformat = V4L2_PIX_FMT_MJPEG;
} }
......
...@@ -91,9 +91,7 @@ static int empress_enum_fmt_vid_cap(struct file *file, void *priv, ...@@ -91,9 +91,7 @@ static int empress_enum_fmt_vid_cap(struct file *file, void *priv,
if (f->index != 0) if (f->index != 0)
return -EINVAL; return -EINVAL;
strscpy(f->description, "MPEG TS", sizeof(f->description));
f->pixelformat = V4L2_PIX_FMT_MPEG; f->pixelformat = V4L2_PIX_FMT_MPEG;
f->flags = V4L2_FMT_FLAG_COMPRESSED;
return 0; return 0;
} }
......
...@@ -90,70 +90,58 @@ static int video_out[][9] = { ...@@ -90,70 +90,58 @@ static int video_out[][9] = {
static struct saa7134_format formats[] = { static struct saa7134_format formats[] = {
{ {
.name = "8 bpp gray",
.fourcc = V4L2_PIX_FMT_GREY, .fourcc = V4L2_PIX_FMT_GREY,
.depth = 8, .depth = 8,
.pm = 0x06, .pm = 0x06,
},{ },{
.name = "15 bpp RGB, le",
.fourcc = V4L2_PIX_FMT_RGB555, .fourcc = V4L2_PIX_FMT_RGB555,
.depth = 16, .depth = 16,
.pm = 0x13 | 0x80, .pm = 0x13 | 0x80,
},{ },{
.name = "15 bpp RGB, be",
.fourcc = V4L2_PIX_FMT_RGB555X, .fourcc = V4L2_PIX_FMT_RGB555X,
.depth = 16, .depth = 16,
.pm = 0x13 | 0x80, .pm = 0x13 | 0x80,
.bswap = 1, .bswap = 1,
},{ },{
.name = "16 bpp RGB, le",
.fourcc = V4L2_PIX_FMT_RGB565, .fourcc = V4L2_PIX_FMT_RGB565,
.depth = 16, .depth = 16,
.pm = 0x10 | 0x80, .pm = 0x10 | 0x80,
},{ },{
.name = "16 bpp RGB, be",
.fourcc = V4L2_PIX_FMT_RGB565X, .fourcc = V4L2_PIX_FMT_RGB565X,
.depth = 16, .depth = 16,
.pm = 0x10 | 0x80, .pm = 0x10 | 0x80,
.bswap = 1, .bswap = 1,
},{ },{
.name = "24 bpp RGB, le",
.fourcc = V4L2_PIX_FMT_BGR24, .fourcc = V4L2_PIX_FMT_BGR24,
.depth = 24, .depth = 24,
.pm = 0x11, .pm = 0x11,
},{ },{
.name = "24 bpp RGB, be",
.fourcc = V4L2_PIX_FMT_RGB24, .fourcc = V4L2_PIX_FMT_RGB24,
.depth = 24, .depth = 24,
.pm = 0x11, .pm = 0x11,
.bswap = 1, .bswap = 1,
},{ },{
.name = "32 bpp RGB, le",
.fourcc = V4L2_PIX_FMT_BGR32, .fourcc = V4L2_PIX_FMT_BGR32,
.depth = 32, .depth = 32,
.pm = 0x12, .pm = 0x12,
},{ },{
.name = "32 bpp RGB, be",
.fourcc = V4L2_PIX_FMT_RGB32, .fourcc = V4L2_PIX_FMT_RGB32,
.depth = 32, .depth = 32,
.pm = 0x12, .pm = 0x12,
.bswap = 1, .bswap = 1,
.wswap = 1, .wswap = 1,
},{ },{
.name = "4:2:2 packed, YUYV",
.fourcc = V4L2_PIX_FMT_YUYV, .fourcc = V4L2_PIX_FMT_YUYV,
.depth = 16, .depth = 16,
.pm = 0x00, .pm = 0x00,
.bswap = 1, .bswap = 1,
.yuv = 1, .yuv = 1,
},{ },{
.name = "4:2:2 packed, UYVY",
.fourcc = V4L2_PIX_FMT_UYVY, .fourcc = V4L2_PIX_FMT_UYVY,
.depth = 16, .depth = 16,
.pm = 0x00, .pm = 0x00,
.yuv = 1, .yuv = 1,
},{ },{
.name = "4:2:2 planar, Y-Cb-Cr",
.fourcc = V4L2_PIX_FMT_YUV422P, .fourcc = V4L2_PIX_FMT_YUV422P,
.depth = 16, .depth = 16,
.pm = 0x09, .pm = 0x09,
...@@ -162,7 +150,6 @@ static struct saa7134_format formats[] = { ...@@ -162,7 +150,6 @@ static struct saa7134_format formats[] = {
.hshift = 1, .hshift = 1,
.vshift = 0, .vshift = 0,
},{ },{
.name = "4:2:0 planar, Y-Cb-Cr",
.fourcc = V4L2_PIX_FMT_YUV420, .fourcc = V4L2_PIX_FMT_YUV420,
.depth = 12, .depth = 12,
.pm = 0x0a, .pm = 0x0a,
...@@ -171,7 +158,6 @@ static struct saa7134_format formats[] = { ...@@ -171,7 +158,6 @@ static struct saa7134_format formats[] = {
.hshift = 1, .hshift = 1,
.vshift = 1, .vshift = 1,
},{ },{
.name = "4:2:0 planar, Y-Cb-Cr",
.fourcc = V4L2_PIX_FMT_YVU420, .fourcc = V4L2_PIX_FMT_YVU420,
.depth = 12, .depth = 12,
.pm = 0x0a, .pm = 0x0a,
...@@ -720,10 +706,10 @@ static int start_preview(struct saa7134_dev *dev) ...@@ -720,10 +706,10 @@ static int start_preview(struct saa7134_dev *dev)
return err; return err;
dev->ovfield = dev->win.field; dev->ovfield = dev->win.field;
video_dbg("start_preview %dx%d+%d+%d %s field=%s\n", video_dbg("%s %dx%d+%d+%d 0x%08x field=%s\n", __func__,
dev->win.w.width, dev->win.w.height, dev->win.w.width, dev->win.w.height,
dev->win.w.left, dev->win.w.top, dev->win.w.left, dev->win.w.top,
dev->ovfmt->name, v4l2_field_names[dev->ovfield]); dev->ovfmt->fourcc, v4l2_field_names[dev->ovfield]);
/* setup window + clipping */ /* setup window + clipping */
set_size(dev, TASK_B, dev->win.w.width, dev->win.w.height, set_size(dev, TASK_B, dev->win.w.width, dev->win.w.height,
...@@ -1780,9 +1766,6 @@ static int saa7134_enum_fmt_vid_cap(struct file *file, void *priv, ...@@ -1780,9 +1766,6 @@ static int saa7134_enum_fmt_vid_cap(struct file *file, void *priv,
if (f->index >= FORMATS) if (f->index >= FORMATS)
return -EINVAL; return -EINVAL;
strscpy(f->description, formats[f->index].name,
sizeof(f->description));
f->pixelformat = formats[f->index].fourcc; f->pixelformat = formats[f->index].fourcc;
return 0; return 0;
...@@ -1799,9 +1782,6 @@ static int saa7134_enum_fmt_vid_overlay(struct file *file, void *priv, ...@@ -1799,9 +1782,6 @@ static int saa7134_enum_fmt_vid_overlay(struct file *file, void *priv,
if ((f->index >= FORMATS) || formats[f->index].planar) if ((f->index >= FORMATS) || formats[f->index].planar)
return -EINVAL; return -EINVAL;
strscpy(f->description, formats[f->index].name,
sizeof(f->description));
f->pixelformat = formats[f->index].fourcc; f->pixelformat = formats[f->index].fourcc;
return 0; return 0;
......
...@@ -98,7 +98,6 @@ struct saa7134_tvaudio { ...@@ -98,7 +98,6 @@ struct saa7134_tvaudio {
}; };
struct saa7134_format { struct saa7134_format {
char *name;
unsigned int fourcc; unsigned int fourcc;
unsigned int depth; unsigned int depth;
unsigned int pm; unsigned int pm;
......
...@@ -503,7 +503,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv, ...@@ -503,7 +503,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
if (f->index != 0) if (f->index != 0)
return -EINVAL; return -EINVAL;
strscpy(f->description, "MPEG", sizeof(f->description));
f->pixelformat = V4L2_PIX_FMT_MPEG; f->pixelformat = V4L2_PIX_FMT_MPEG;
return 0; return 0;
......
...@@ -822,25 +822,18 @@ static int solo_enc_enum_fmt_cap(struct file *file, void *priv, ...@@ -822,25 +822,18 @@ static int solo_enc_enum_fmt_cap(struct file *file, void *priv,
switch (dev_type) { switch (dev_type) {
case SOLO_DEV_6010: case SOLO_DEV_6010:
f->pixelformat = V4L2_PIX_FMT_MPEG4; f->pixelformat = V4L2_PIX_FMT_MPEG4;
strscpy(f->description, "MPEG-4 part 2",
sizeof(f->description));
break; break;
case SOLO_DEV_6110: case SOLO_DEV_6110:
f->pixelformat = V4L2_PIX_FMT_H264; f->pixelformat = V4L2_PIX_FMT_H264;
strscpy(f->description, "H.264", sizeof(f->description));
break; break;
} }
break; break;
case 1: case 1:
f->pixelformat = V4L2_PIX_FMT_MJPEG; f->pixelformat = V4L2_PIX_FMT_MJPEG;
strscpy(f->description, "MJPEG", sizeof(f->description));
break; break;
default: default:
return -EINVAL; return -EINVAL;
} }
f->flags = V4L2_FMT_FLAG_COMPRESSED;
return 0; return 0;
} }
......
...@@ -458,8 +458,6 @@ static int solo_enum_fmt_cap(struct file *file, void *priv, ...@@ -458,8 +458,6 @@ static int solo_enum_fmt_cap(struct file *file, void *priv,
return -EINVAL; return -EINVAL;
f->pixelformat = V4L2_PIX_FMT_UYVY; f->pixelformat = V4L2_PIX_FMT_UYVY;
strscpy(f->description, "UYUV 4:2:2 Packed", sizeof(f->description));
return 0; return 0;
} }
......
...@@ -560,9 +560,7 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv, ...@@ -560,9 +560,7 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
if (f->index != 0) if (f->index != 0)
return -EINVAL; return -EINVAL;
strscpy(f->description, "4:2:2, packed, UYVY", sizeof(f->description));
f->pixelformat = V4L2_PIX_FMT_UYVY; f->pixelformat = V4L2_PIX_FMT_UYVY;
f->flags = 0;
return 0; return 0;
} }
......
...@@ -34,53 +34,43 @@ ...@@ -34,53 +34,43 @@
*/ */
static const struct tw68_format formats[] = { static const struct tw68_format formats[] = {
{ {
.name = "15 bpp RGB, le",
.fourcc = V4L2_PIX_FMT_RGB555, .fourcc = V4L2_PIX_FMT_RGB555,
.depth = 16, .depth = 16,
.twformat = ColorFormatRGB15, .twformat = ColorFormatRGB15,
}, { }, {
.name = "15 bpp RGB, be",
.fourcc = V4L2_PIX_FMT_RGB555X, .fourcc = V4L2_PIX_FMT_RGB555X,
.depth = 16, .depth = 16,
.twformat = ColorFormatRGB15 | ColorFormatBSWAP, .twformat = ColorFormatRGB15 | ColorFormatBSWAP,
}, { }, {
.name = "16 bpp RGB, le",
.fourcc = V4L2_PIX_FMT_RGB565, .fourcc = V4L2_PIX_FMT_RGB565,
.depth = 16, .depth = 16,
.twformat = ColorFormatRGB16, .twformat = ColorFormatRGB16,
}, { }, {
.name = "16 bpp RGB, be",
.fourcc = V4L2_PIX_FMT_RGB565X, .fourcc = V4L2_PIX_FMT_RGB565X,
.depth = 16, .depth = 16,
.twformat = ColorFormatRGB16 | ColorFormatBSWAP, .twformat = ColorFormatRGB16 | ColorFormatBSWAP,
}, { }, {
.name = "24 bpp RGB, le",
.fourcc = V4L2_PIX_FMT_BGR24, .fourcc = V4L2_PIX_FMT_BGR24,
.depth = 24, .depth = 24,
.twformat = ColorFormatRGB24, .twformat = ColorFormatRGB24,
}, { }, {
.name = "24 bpp RGB, be",
.fourcc = V4L2_PIX_FMT_RGB24, .fourcc = V4L2_PIX_FMT_RGB24,
.depth = 24, .depth = 24,
.twformat = ColorFormatRGB24 | ColorFormatBSWAP, .twformat = ColorFormatRGB24 | ColorFormatBSWAP,
}, { }, {
.name = "32 bpp RGB, le",
.fourcc = V4L2_PIX_FMT_BGR32, .fourcc = V4L2_PIX_FMT_BGR32,
.depth = 32, .depth = 32,
.twformat = ColorFormatRGB32, .twformat = ColorFormatRGB32,
}, { }, {
.name = "32 bpp RGB, be",
.fourcc = V4L2_PIX_FMT_RGB32, .fourcc = V4L2_PIX_FMT_RGB32,
.depth = 32, .depth = 32,
.twformat = ColorFormatRGB32 | ColorFormatBSWAP | .twformat = ColorFormatRGB32 | ColorFormatBSWAP |
ColorFormatWSWAP, ColorFormatWSWAP,
}, { }, {
.name = "4:2:2 packed, YUYV",
.fourcc = V4L2_PIX_FMT_YUYV, .fourcc = V4L2_PIX_FMT_YUYV,
.depth = 16, .depth = 16,
.twformat = ColorFormatYUY2, .twformat = ColorFormatYUY2,
}, { }, {
.name = "4:2:2 packed, UYVY",
.fourcc = V4L2_PIX_FMT_UYVY, .fourcc = V4L2_PIX_FMT_UYVY,
.depth = 16, .depth = 16,
.twformat = ColorFormatYUY2 | ColorFormatBSWAP, .twformat = ColorFormatYUY2 | ColorFormatBSWAP,
...@@ -774,9 +764,6 @@ static int tw68_enum_fmt_vid_cap(struct file *file, void *priv, ...@@ -774,9 +764,6 @@ static int tw68_enum_fmt_vid_cap(struct file *file, void *priv,
if (f->index >= FORMATS) if (f->index >= FORMATS)
return -EINVAL; return -EINVAL;
strscpy(f->description, formats[f->index].name,
sizeof(f->description));
f->pixelformat = formats[f->index].fourcc; f->pixelformat = formats[f->index].fourcc;
return 0; return 0;
......
...@@ -85,7 +85,6 @@ struct tw68_tvnorm { ...@@ -85,7 +85,6 @@ struct tw68_tvnorm {
}; };
struct tw68_format { struct tw68_format {
char *name;
u32 fourcc; u32 fourcc;
u32 depth; u32 depth;
u32 twformat; u32 twformat;
......
...@@ -32,7 +32,6 @@ struct saa7146_video_dma { ...@@ -32,7 +32,6 @@ struct saa7146_video_dma {
#define FORMAT_IS_PLANAR 0x2 #define FORMAT_IS_PLANAR 0x2
struct saa7146_format { struct saa7146_format {
char *name;
u32 pixelformat; u32 pixelformat;
u32 trans; u32 trans;
u8 depth; u8 depth;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment