media: media/usb: don't set description in ENUM_FMT
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Tue, 11 Jun 2019 13:48:54 +0000 (09:48 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 22 Jul 2019 18:01:05 +0000 (14:01 -0400)
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: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
24 files changed:
drivers/media/dvb-frontends/rtl2832_sdr.c
drivers/media/usb/airspy/airspy.c
drivers/media/usb/au0828/au0828-video.c
drivers/media/usb/cpia2/cpia2_v4l.c
drivers/media/usb/cx231xx/cx231xx-417.c
drivers/media/usb/cx231xx/cx231xx-video.c
drivers/media/usb/cx231xx/cx231xx.h
drivers/media/usb/em28xx/em28xx-video.c
drivers/media/usb/em28xx/em28xx.h
drivers/media/usb/go7007/go7007-v4l2.c
drivers/media/usb/gspca/gspca.c
drivers/media/usb/hdpvr/hdpvr-video.c
drivers/media/usb/msi2500/msi2500.c
drivers/media/usb/pwc/pwc-v4l.c
drivers/media/usb/s2255/s2255drv.c
drivers/media/usb/stk1160/stk1160-v4l.c
drivers/media/usb/stk1160/stk1160.h
drivers/media/usb/stkwebcam/stk-webcam.c
drivers/media/usb/tm6000/tm6000-video.c
drivers/media/usb/tm6000/tm6000.h
drivers/media/usb/usbtv/usbtv-video.c
drivers/media/usb/usbvision/usbvision-video.c
drivers/media/usb/usbvision/usbvision.h
drivers/media/usb/zr364xx/zr364xx.c

index e05c21d35dc82179c730b24bbaadb1a427515eba..60d1e59d22921643bf1abdafc90a1e459656029b 100644 (file)
@@ -81,11 +81,9 @@ struct rtl2832_sdr_format {
 
 static struct rtl2832_sdr_format formats[] = {
        {
-               .name           = "Complex U8",
                .pixelformat    = V4L2_SDR_FMT_CU8,
                .buffersize     = BULK_BUFFER_SIZE,
        }, {
-               .name           = "Complex U16LE (emulated)",
                .pixelformat    = V4L2_SDR_FMT_CU16LE,
                .buffersize     = BULK_BUFFER_SIZE * 2,
        },
@@ -1116,7 +1114,6 @@ static int rtl2832_sdr_enum_fmt_sdr_cap(struct file *file, void *priv,
        if (f->index >= dev->num_formats)
                return -EINVAL;
 
-       strscpy(f->description, formats[f->index].name, sizeof(f->description));
        f->pixelformat = formats[f->index].pixelformat;
 
        return 0;
index b35231ffe50316330238cc70a2909d837b990be2..751703db06f517ab727f4893c8a2e9a106b2bbe9 100644 (file)
@@ -71,7 +71,6 @@ static const struct v4l2_frequency_band bands_rf[] = {
 
 /* stream formats */
 struct airspy_format {
-       char    *name;
        u32     pixelformat;
        u32     buffersize;
 };
@@ -79,7 +78,6 @@ struct airspy_format {
 /* format descriptions for capture and preview */
 static struct airspy_format formats[] = {
        {
-               .name           = "Real U12LE",
                .pixelformat    = V4L2_SDR_FMT_RU12LE,
                .buffersize     = BULK_BUFFER_SIZE,
        },
@@ -622,7 +620,6 @@ static int airspy_enum_fmt_sdr_cap(struct file *file, void *priv,
        if (f->index >= NUM_FORMATS)
                return -EINVAL;
 
-       strscpy(f->description, formats[f->index].name, sizeof(f->description));
        f->pixelformat = formats[f->index].pixelformat;
 
        return 0;
index 5e00019bce8a6476f862ceeb8cf35b63837a69cd..e390ca57520a2c3c6bb76c9a71b376fd7f8a1af0 100644 (file)
@@ -1207,10 +1207,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void  *priv,
 
        dprintk(1, "%s called\n", __func__);
 
-       f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-       strscpy(f->description, "Packed YUV2", sizeof(f->description));
-
-       f->flags = 0;
        f->pixelformat = V4L2_PIX_FMT_UYVY;
 
        return 0;
index 0feae825cebb4756c0ebd4815c4af54395a63d03..ded7eb2dc40a8db7f8642fd5e1afdf8dbf288307 100644 (file)
@@ -292,28 +292,13 @@ static int cpia2_s_input(struct file *file, void *fh, unsigned int i)
 static int cpia2_enum_fmt_vid_cap(struct file *file, void *fh,
                                            struct v4l2_fmtdesc *f)
 {
-       int index = f->index;
-
-       if (index < 0 || index > 1)
-              return -EINVAL;
+       if (f->index > 1)
+               return -EINVAL;
 
-       memset(f, 0, sizeof(*f));
-       f->index = index;
-       f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-       f->flags = V4L2_FMT_FLAG_COMPRESSED;
-       switch(index) {
-       case 0:
-               strscpy(f->description, "MJPEG", sizeof(f->description));
+       if (f->index == 0)
                f->pixelformat = V4L2_PIX_FMT_MJPEG;
-               break;
-       case 1:
-               strscpy(f->description, "JPEG", sizeof(f->description));
+       else
                f->pixelformat = V4L2_PIX_FMT_JPEG;
-               break;
-       default:
-               return -EINVAL;
-       }
-
        return 0;
 }
 
index 2475f69a2f1ce3b2f4fd451301cb2f1ac54e98b8..30624376679b20a85bdb9a8a2d635dd2e9238bf5 100644 (file)
@@ -1592,7 +1592,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void  *priv,
        if (f->index != 0)
                return -EINVAL;
 
-       strscpy(f->description, "MPEG", sizeof(f->description));
        f->pixelformat = V4L2_PIX_FMT_MPEG;
 
        return 0;
index b651ac7713ea88b2d5f8d0dd969499af50b3ba54..c77597917ca18e5488bf3a0171729cc5a4f94475 100644 (file)
@@ -80,7 +80,6 @@ MODULE_PARM_DESC(video_debug, "enable debug messages [video]");
 /* supported video standards */
 static struct cx231xx_fmt format[] = {
        {
-        .name = "16bpp YUY2, 4:2:2, packed",
         .fourcc = V4L2_PIX_FMT_YUYV,
         .depth = 16,
         .reg = 0,
@@ -1578,7 +1577,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
        if (unlikely(f->index >= ARRAY_SIZE(format)))
                return -EINVAL;
 
-       strscpy(f->description, format[f->index].name, sizeof(f->description));
        f->pixelformat = format[f->index].fourcc;
 
        return 0;
index 3efa8ff93c1cfaa9730fedf5cd2978eb4d99a7ef..b007611abc373b535b812688bd5646324e7bda81 100644 (file)
 #define CX23417_RESET    9
 
 struct cx23417_fmt {
-       char  *name;
        u32   fourcc;          /* v4l2 format id */
        int   depth;
        int   flags;
index 0512e19593945d04c2cc949a35ba6ca742e6ff87..82eb1550ec3b105902394cf6bddc60e20fb00598 100644 (file)
@@ -102,37 +102,30 @@ MODULE_PARM_DESC(video_debug, "enable debug messages [video]");
 /* supported video standards */
 static struct em28xx_fmt format[] = {
        {
-               .name     = "16 bpp YUY2, 4:2:2, packed",
                .fourcc   = V4L2_PIX_FMT_YUYV,
                .depth    = 16,
                .reg      = EM28XX_OUTFMT_YUV422_Y0UY1V,
        }, {
-               .name     = "16 bpp RGB 565, LE",
                .fourcc   = V4L2_PIX_FMT_RGB565,
                .depth    = 16,
                .reg      = EM28XX_OUTFMT_RGB_16_656,
        }, {
-               .name     = "8 bpp Bayer RGRG..GBGB",
                .fourcc   = V4L2_PIX_FMT_SRGGB8,
                .depth    = 8,
                .reg      = EM28XX_OUTFMT_RGB_8_RGRG,
        }, {
-               .name     = "8 bpp Bayer BGBG..GRGR",
                .fourcc   = V4L2_PIX_FMT_SBGGR8,
                .depth    = 8,
                .reg      = EM28XX_OUTFMT_RGB_8_BGBG,
        }, {
-               .name     = "8 bpp Bayer GRGR..BGBG",
                .fourcc   = V4L2_PIX_FMT_SGRBG8,
                .depth    = 8,
                .reg      = EM28XX_OUTFMT_RGB_8_GRGR,
        }, {
-               .name     = "8 bpp Bayer GBGB..RGRG",
                .fourcc   = V4L2_PIX_FMT_SGBRG8,
                .depth    = 8,
                .reg      = EM28XX_OUTFMT_RGB_8_GBGB,
        }, {
-               .name     = "12 bpp YUV411",
                .fourcc   = V4L2_PIX_FMT_YUV411P,
                .depth    = 12,
                .reg      = EM28XX_OUTFMT_YUV411,
@@ -2011,7 +2004,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void  *priv,
        if (unlikely(f->index >= ARRAY_SIZE(format)))
                return -EINVAL;
 
-       strscpy(f->description, format[f->index].name, sizeof(f->description));
        f->pixelformat = format[f->index].fourcc;
 
        return 0;
index a551072e62ed1fb9a03293b389b8d4c6e27d9b30..c69e0bc46eb7d58be6d61caf21175e470cd35ab7 100644 (file)
@@ -251,13 +251,11 @@ struct em28xx_usb_ctl {
 /**
  * struct em28xx_fmt - Struct to enumberate video formats
  *
- * @name:      Name for the video standard
  * @fourcc:    v4l2 format id
  * @depth:     mean number of bits to represent a pixel
  * @reg:       em28xx register value to set it
  */
 struct em28xx_fmt {
-       char    *name;
        u32     fourcc;
        int     depth;
        int     reg;
index 88edfef80b40933df509fcfdee6ccbf4ee676ba2..0b3d185f3cb0aebe1d4643f5fe72ce9084dc435b 100644 (file)
@@ -285,33 +285,22 @@ static int vidioc_querycap(struct file *file, void  *priv,
 static int vidioc_enum_fmt_vid_cap(struct file *file, void  *priv,
                                        struct v4l2_fmtdesc *fmt)
 {
-       char *desc = NULL;
-
        switch (fmt->index) {
        case 0:
                fmt->pixelformat = V4L2_PIX_FMT_MJPEG;
-               desc = "Motion JPEG";
                break;
        case 1:
                fmt->pixelformat = V4L2_PIX_FMT_MPEG1;
-               desc = "MPEG-1 ES";
                break;
        case 2:
                fmt->pixelformat = V4L2_PIX_FMT_MPEG2;
-               desc = "MPEG-2 ES";
                break;
        case 3:
                fmt->pixelformat = V4L2_PIX_FMT_MPEG4;
-               desc = "MPEG-4 ES";
                break;
        default:
                return -EINVAL;
        }
-       fmt->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-       fmt->flags = V4L2_FMT_FLAG_COMPRESSED;
-
-       strscpy(fmt->description, desc, sizeof(fmt->description));
-
        return 0;
 }
 
index be11f7830bca25dcf8dc2ee979c8e3e42d09531b..83b78a42414e704e2d2cf5bb679d8174be7b41d3 100644 (file)
@@ -1024,15 +1024,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void  *priv,
                return -EINVAL;         /* no more format */
 
        fmtdesc->pixelformat = fmt_tb[index];
-       if (gspca_dev->cam.cam_mode[i].sizeimage <
-                       gspca_dev->cam.cam_mode[i].width *
-                               gspca_dev->cam.cam_mode[i].height)
-               fmtdesc->flags = V4L2_FMT_FLAG_COMPRESSED;
-       fmtdesc->description[0] = fmtdesc->pixelformat & 0xff;
-       fmtdesc->description[1] = (fmtdesc->pixelformat >> 8) & 0xff;
-       fmtdesc->description[2] = (fmtdesc->pixelformat >> 16) & 0xff;
-       fmtdesc->description[3] = fmtdesc->pixelformat >> 24;
-       fmtdesc->description[4] = '\0';
        return 0;
 }
 
index 5b3e67b80627cecb39e3b5b313e45de24c5b4799..bad71d863d395c8582004fd8480507f2fc44ed31 100644 (file)
@@ -987,9 +987,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *private_data,
        if (f->index != 0)
                return -EINVAL;
 
-       f->flags = V4L2_FMT_FLAG_COMPRESSED;
-       strscpy(f->description, "MPEG2-TS with AVC/AAC streams",
-               sizeof(f->description));
        f->pixelformat = V4L2_PIX_FMT_MPEG;
 
        return 0;
index 4c9b2a12acfb5dc2aa26090d41728f7245f2540b..65be6f140fe83622c6dbb62c2195b398092c2cc3 100644 (file)
@@ -66,7 +66,6 @@ static const struct v4l2_frequency_band bands[] = {
 
 /* stream formats */
 struct msi2500_format {
-       char    *name;
        u32     pixelformat;
        u32     buffersize;
 };
@@ -74,27 +73,21 @@ struct msi2500_format {
 /* format descriptions for capture and preview */
 static struct msi2500_format formats[] = {
        {
-               .name           = "Complex S8",
                .pixelformat    = V4L2_SDR_FMT_CS8,
                .buffersize     = 3 * 1008,
 #if 0
        }, {
-               .name           = "10+2-bit signed",
                .pixelformat    = MSI2500_PIX_FMT_SDR_MSI2500_384,
        }, {
-               .name           = "12-bit signed",
                .pixelformat    = MSI2500_PIX_FMT_SDR_S12,
 #endif
        }, {
-               .name           = "Complex S14LE",
                .pixelformat    = V4L2_SDR_FMT_CS14LE,
                .buffersize     = 3 * 1008,
        }, {
-               .name           = "Complex U8 (emulated)",
                .pixelformat    = V4L2_SDR_FMT_CU8,
                .buffersize     = 3 * 1008,
        }, {
-               .name           = "Complex U16LE (emulated)",
                .pixelformat    =  V4L2_SDR_FMT_CU16LE,
                .buffersize     = 3 * 1008,
        },
@@ -904,7 +897,6 @@ static int msi2500_enum_fmt_sdr_cap(struct file *file, void *priv,
        if (f->index >= dev->num_formats)
                return -EINVAL;
 
-       strscpy(f->description, formats[f->index].name, sizeof(f->description));
        f->pixelformat = formats[f->index].pixelformat;
 
        return 0;
index 76c498cccc496f3bd740d30f0bd2295ac1b162e0..2f135d533af6f666aefdc295262838d6c034b4b9 100644 (file)
@@ -873,14 +873,9 @@ static int pwc_enum_fmt_vid_cap(struct file *file, void *fh, struct v4l2_fmtdesc
        case 0:
                /* RAW format */
                f->pixelformat = pdev->type <= 646 ? V4L2_PIX_FMT_PWC1 : V4L2_PIX_FMT_PWC2;
-               f->flags = V4L2_FMT_FLAG_COMPRESSED;
-               strscpy(f->description, "Raw Philips Webcam",
-                       sizeof(f->description));
                break;
        case 1:
                f->pixelformat = V4L2_PIX_FMT_YUV420;
-               strscpy(f->description, "4:2:0, planar, Y-Cb-Cr",
-                       sizeof(f->description));
                break;
        default:
                return -EINVAL;
index aa90558479f7e17306690636823056158a12dd85..533f7f064a4437e2805e4b8d32aa6cfe0c2c061a 100644 (file)
@@ -273,7 +273,6 @@ static inline struct s2255_dev *to_s2255_dev(struct v4l2_device *v4l2_dev)
 }
 
 struct s2255_fmt {
-       char *name;
        u32 fourcc;
        int depth;
 };
@@ -385,29 +384,23 @@ MODULE_DEVICE_TABLE(usb, s2255_table);
 /* JPEG formats must be defined last to support jpeg_enable parameter */
 static const struct s2255_fmt formats[] = {
        {
-               .name = "4:2:2, packed, YUYV",
                .fourcc = V4L2_PIX_FMT_YUYV,
                .depth = 16
 
        }, {
-               .name = "4:2:2, packed, UYVY",
                .fourcc = V4L2_PIX_FMT_UYVY,
                .depth = 16
        }, {
-               .name = "4:2:2, planar, YUV422P",
                .fourcc = V4L2_PIX_FMT_YUV422P,
                .depth = 16
 
        }, {
-               .name = "8bpp GREY",
                .fourcc = V4L2_PIX_FMT_GREY,
                .depth = 8
        }, {
-               .name = "JPG",
                .fourcc = V4L2_PIX_FMT_JPEG,
                .depth = 24
        }, {
-               .name = "MJPG",
                .fourcc = V4L2_PIX_FMT_MJPEG,
                .depth = 24
        }
@@ -737,7 +730,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
        if (!jpeg_enable && ((formats[index].fourcc == V4L2_PIX_FMT_JPEG) ||
                        (formats[index].fourcc == V4L2_PIX_FMT_MJPEG)))
                return -EINVAL;
-       strscpy(f->description, formats[index].name, sizeof(f->description));
        f->pixelformat = formats[index].fourcc;
        return 0;
 }
index b71a0f4b40b5a4cdc5eb00c4d57a407f78201b78..bcd14c66e8dfa5d51a2616127f5826dc8a543ee4 100644 (file)
@@ -46,7 +46,6 @@ struct stk1160_decimate_ctrl {
 /* supported video standards */
 static struct stk1160_fmt format[] = {
        {
-               .name     = "16 bpp YUY2, 4:2:2, packed",
                .fourcc   = V4L2_PIX_FMT_UYVY,
                .depth    = 16,
        }
@@ -346,7 +345,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void  *priv,
        if (f->index != 0)
                return -EINVAL;
 
-       strscpy(f->description, format[f->index].name, sizeof(f->description));
        f->pixelformat = format[f->index].fourcc;
        return 0;
 }
index 099ce2a2f021ec8a8a233cdc7b64db29c0c208f7..a31ea1c80f25569a9312e228601c3ac58665bd36 100644 (file)
@@ -102,7 +102,6 @@ struct stk1160_isoc_ctl {
 };
 
 struct stk1160_fmt {
-       char  *name;
        u32   fourcc;          /* v4l2 format id */
        int   depth;
 };
index be8041e3e6b86a2cff46e9bf8711ee43130c6448..cfca3c70599ba34fffa567c78a866c6116655781 100644 (file)
@@ -857,23 +857,18 @@ static int stk_vidioc_enum_fmt_vid_cap(struct file *filp,
        switch (fmtd->index) {
        case 0:
                fmtd->pixelformat = V4L2_PIX_FMT_RGB565;
-               strscpy(fmtd->description, "r5g6b5", sizeof(fmtd->description));
                break;
        case 1:
                fmtd->pixelformat = V4L2_PIX_FMT_RGB565X;
-               strscpy(fmtd->description, "r5g6b5BE", sizeof(fmtd->description));
                break;
        case 2:
                fmtd->pixelformat = V4L2_PIX_FMT_UYVY;
-               strscpy(fmtd->description, "yuv4:2:2", sizeof(fmtd->description));
                break;
        case 3:
                fmtd->pixelformat = V4L2_PIX_FMT_SBGGR8;
-               strscpy(fmtd->description, "Raw bayer", sizeof(fmtd->description));
                break;
        case 4:
                fmtd->pixelformat = V4L2_PIX_FMT_YUYV;
-               strscpy(fmtd->description, "yuv4:2:2", sizeof(fmtd->description));
                break;
        default:
                return -EINVAL;
index 85fcddfb02023efbf1f0298cd66615fb7fcb763a..c07a81a6cbe29d846c4e41768a51ef8c3f102f84 100644 (file)
@@ -52,15 +52,12 @@ EXPORT_SYMBOL_GPL(tm6000_debug);
 
 static struct tm6000_fmt format[] = {
        {
-               .name     = "4:2:2, packed, YVY2",
                .fourcc   = V4L2_PIX_FMT_YUYV,
                .depth    = 16,
        }, {
-               .name     = "4:2:2, packed, UYVY",
                .fourcc   = V4L2_PIX_FMT_UYVY,
                .depth    = 16,
        }, {
-               .name     = "A/V + VBI mux packet",
                .fourcc   = V4L2_PIX_FMT_TM6000,
                .depth    = 16,
        }
@@ -875,7 +872,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void  *priv,
        if (f->index >= ARRAY_SIZE(format))
                return -EINVAL;
 
-       strscpy(f->description, format[f->index].name, sizeof(f->description));
        f->pixelformat = format[f->index].fourcc;
        return 0;
 }
index 0864ed7314eb24c506d7ff586db731e5d4ab5b09..bf396544da9a8233964296771c4c8b1531bdeb94 100644 (file)
@@ -64,7 +64,6 @@ struct tm6000_input {
  */
 
 struct tm6000_fmt {
-       char  *name;
        u32   fourcc;          /* v4l2 format id */
        int   depth;
 };
index 51f784479e91a07bbdf3aba4fb945f1194e26c6f..3d9284a09ee59dd461339bc30a1f9e36aa19c5bb 100644 (file)
@@ -633,8 +633,6 @@ static int usbtv_enum_fmt_vid_cap(struct file *file, void  *priv,
        if (f->index > 0)
                return -EINVAL;
 
-       strscpy(f->description, "16 bpp YUY2, 4:2:2, packed",
-               sizeof(f->description));
        f->pixelformat = V4L2_PIX_FMT_YUYV;
        return 0;
 }
index 93750af82d98a01166d175961dd4bbecbfe5569e..0874526f599e629f1e240dbc1019f6d128c9b291 100644 (file)
 static int usbvision_nr;
 
 static struct usbvision_v4l2_format_st usbvision_v4l2_format[] = {
-       { 1, 1,  8, V4L2_PIX_FMT_GREY    , "GREY" },
-       { 1, 2, 16, V4L2_PIX_FMT_RGB565  , "RGB565" },
-       { 1, 3, 24, V4L2_PIX_FMT_RGB24   , "RGB24" },
-       { 1, 4, 32, V4L2_PIX_FMT_RGB32   , "RGB32" },
-       { 1, 2, 16, V4L2_PIX_FMT_RGB555  , "RGB555" },
-       { 1, 2, 16, V4L2_PIX_FMT_YUYV    , "YUV422" },
-       { 1, 2, 12, V4L2_PIX_FMT_YVU420  , "YUV420P" }, /* 1.5 ! */
-       { 1, 2, 16, V4L2_PIX_FMT_YUV422P , "YUV422P" }
+       { 1, 1,  8, V4L2_PIX_FMT_GREY },
+       { 1, 2, 16, V4L2_PIX_FMT_RGB565 },
+       { 1, 3, 24, V4L2_PIX_FMT_RGB24 },
+       { 1, 4, 32, V4L2_PIX_FMT_RGB32 },
+       { 1, 2, 16, V4L2_PIX_FMT_RGB555 },
+       { 1, 2, 16, V4L2_PIX_FMT_YUYV },
+       { 1, 2, 12, V4L2_PIX_FMT_YVU420 }, /* 1.5 ! */
+       { 1, 2, 16, V4L2_PIX_FMT_YUV422P }
 };
 
 /* Function prototypes */
@@ -796,8 +796,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void  *priv,
 {
        if (vfd->index >= USBVISION_SUPPORTED_PALETTES - 1)
                return -EINVAL;
-       strscpy(vfd->description, usbvision_v4l2_format[vfd->index].desc,
-               sizeof(vfd->description));
        vfd->pixelformat = usbvision_v4l2_format[vfd->index].format;
        return 0;
 }
index 4198f972a47b654e869c6bb378a934f1ec111f69..11539578e8d237e1f5ab0c45e96d51ec2fd1b00a 100644 (file)
@@ -264,7 +264,6 @@ struct usbvision_v4l2_format_st {
        int             bytes_per_pixel;
        int             depth;
        int             format;
-       char            *desc;
 };
 #define USBVISION_SUPPORTED_PALETTES ARRAY_SIZE(usbvision_v4l2_format)
 
index a9bcba4fa9c6a999da9fdb345465cc29560a9dc8..b8e89d550d2951334174501b7a14b694f4100132 100644 (file)
@@ -141,7 +141,6 @@ struct zr364xx_pipeinfo {
 };
 
 struct zr364xx_fmt {
-       char *name;
        u32 fourcc;
        int depth;
 };
@@ -149,7 +148,6 @@ struct zr364xx_fmt {
 /* image formats.  */
 static const struct zr364xx_fmt formats[] = {
        {
-               .name = "JPG",
                .fourcc = V4L2_PIX_FMT_JPEG,
                .depth = 24
        }
@@ -376,8 +374,7 @@ static int buffer_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb,
                                                  vb);
        int rc;
 
-       DBG("%s, field=%d, fmt name = %s\n", __func__, field,
-           cam->fmt ? cam->fmt->name : "");
+       DBG("%s, field=%d\n", __func__, field);
        if (!cam->fmt)
                return -EINVAL;
 
@@ -751,8 +748,6 @@ static int zr364xx_vidioc_enum_fmt_vid_cap(struct file *file,
 {
        if (f->index > 0)
                return -EINVAL;
-       f->flags = V4L2_FMT_FLAG_COMPRESSED;
-       strscpy(f->description, formats[0].name, sizeof(f->description));
        f->pixelformat = formats[0].fourcc;
        return 0;
 }