linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] media: let v4l2-ioctl set the format description
@ 2019-06-26 11:27 Hans Verkuil
  2019-06-26 11:27 ` [PATCH 1/5] v4l2-ioctl: add missing pixelformats Hans Verkuil
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Hans Verkuil @ 2019-06-26 11:27 UTC (permalink / raw)
  To: linux-media

The v4l_fill_fmtdesc() function in v4l2-ioctl.c fills in the format
description and the format flags. But a lot of drivers still manually
set the description/flags. Since the description names are all over
the place it is far better to let the core handle this.

This series converts 99% of all drivers.

While working on this I discovered that some of the newer pixelformats
weren't added to v4l_fill_fmtdesc(), so add those first.

Next are the patches that update the usb, pci, staging and platform
media drivers.

Regards,

	Hans

Hans Verkuil (5):
  v4l2-ioctl: add missing pixelformats
  media/usb: don't set description in ENUM_FMT
  media/pci: don't set description for ENUM_FMT
  drivers/staging/media: don't set description for ENUM_FMT
  media/platform: don't set description in ENUM_FMT

 drivers/media/common/saa7146/saa7146_video.c  | 16 +-------
 drivers/media/dvb-frontends/rtl2832_sdr.c     |  3 --
 drivers/media/pci/bt8xx/bttv-driver.c         | 19 ---------
 drivers/media/pci/bt8xx/bttv-risc.c           |  8 ++--
 drivers/media/pci/bt8xx/bttvp.h               |  1 -
 drivers/media/pci/cobalt/cobalt-v4l2.c        |  5 ---
 drivers/media/pci/cx23885/cx23885-417.c       |  1 -
 drivers/media/pci/cx23885/cx23885-video.c     |  7 +---
 drivers/media/pci/cx23885/cx23885.h           |  1 -
 drivers/media/pci/cx25821/cx25821-video.c     |  7 +---
 drivers/media/pci/cx25821/cx25821.h           |  1 -
 drivers/media/pci/cx88/cx88-blackbird.c       |  2 -
 drivers/media/pci/cx88/cx88-video.c           | 17 ++------
 drivers/media/pci/cx88/cx88.h                 |  1 -
 drivers/media/pci/dt3155/dt3155.c             |  1 -
 drivers/media/pci/meye/meye.c                 |  3 --
 drivers/media/pci/saa7134/saa7134-empress.c   |  2 -
 drivers/media/pci/saa7134/saa7134-video.c     | 28 ++-----------
 drivers/media/pci/saa7134/saa7134.h           |  1 -
 drivers/media/pci/saa7164/saa7164-encoder.c   |  1 -
 .../media/pci/solo6x10/solo6x10-v4l2-enc.c    |  7 ----
 drivers/media/pci/solo6x10/solo6x10-v4l2.c    |  2 -
 drivers/media/pci/sta2x11/sta2x11_vip.c       |  2 -
 drivers/media/pci/tw68/tw68-video.c           | 13 ------
 drivers/media/pci/tw68/tw68.h                 |  1 -
 drivers/media/platform/am437x/am437x-vpfe.c   | 18 +--------
 drivers/media/platform/davinci/vpbe_display.c | 14 +------
 drivers/media/platform/davinci/vpif_capture.c | 11 +----
 drivers/media/platform/davinci/vpif_display.c |  4 --
 drivers/media/platform/exynos-gsc/gsc-core.c  | 22 ----------
 drivers/media/platform/exynos-gsc/gsc-core.h  |  2 -
 .../media/platform/exynos4-is/fimc-capture.c  |  3 --
 drivers/media/platform/exynos4-is/fimc-core.c | 20 ----------
 .../platform/exynos4-is/fimc-isp-video.c      |  1 -
 drivers/media/platform/exynos4-is/fimc-isp.c  |  3 --
 drivers/media/platform/exynos4-is/fimc-lite.c |  8 ----
 drivers/media/platform/exynos4-is/fimc-m2m.c  |  1 -
 drivers/media/platform/m2m-deinterlace.c      |  4 --
 .../media/platform/marvell-ccic/mcam-core.c   | 10 -----
 drivers/media/platform/mx2_emmaprp.c          |  4 --
 drivers/media/platform/omap/omap_vout.c       |  7 ----
 .../media/platform/s3c-camif/camif-capture.c  | 11 ++---
 drivers/media/platform/s3c-camif/camif-core.c |  6 ---
 drivers/media/platform/s3c-camif/camif-core.h |  1 -
 drivers/media/platform/s5p-g2d/g2d.c          |  6 ---
 drivers/media/platform/s5p-g2d/g2d.h          |  1 -
 drivers/media/platform/s5p-jpeg/jpeg-core.c   | 27 -------------
 drivers/media/platform/s5p-jpeg/jpeg-core.h   |  2 -
 .../media/platform/s5p-mfc/s5p_mfc_common.h   |  1 -
 drivers/media/platform/s5p-mfc/s5p_mfc_dec.c  | 15 -------
 drivers/media/platform/s5p-mfc/s5p_mfc_enc.c  | 10 -----
 drivers/media/platform/sh_veu.c               | 19 ++++-----
 drivers/media/platform/sh_vou.c               | 12 +-----
 drivers/media/platform/ti-vpe/vpe.c           | 12 ------
 drivers/media/platform/via-camera.c           |  4 --
 drivers/media/platform/xilinx/xilinx-dma.c    |  2 -
 drivers/media/platform/xilinx/xilinx-vip.c    | 16 ++++----
 drivers/media/platform/xilinx/xilinx-vip.h    |  2 -
 drivers/media/usb/airspy/airspy.c             |  3 --
 drivers/media/usb/au0828/au0828-video.c       |  4 --
 drivers/media/usb/cpia2/cpia2_v4l.c           | 23 ++---------
 drivers/media/usb/cx231xx/cx231xx-417.c       |  1 -
 drivers/media/usb/cx231xx/cx231xx-video.c     |  2 -
 drivers/media/usb/cx231xx/cx231xx.h           |  1 -
 drivers/media/usb/em28xx/em28xx-video.c       |  8 ----
 drivers/media/usb/em28xx/em28xx.h             |  2 -
 drivers/media/usb/go7007/go7007-v4l2.c        | 11 -----
 drivers/media/usb/gspca/gspca.c               |  9 -----
 drivers/media/usb/hdpvr/hdpvr-video.c         |  3 --
 drivers/media/usb/msi2500/msi2500.c           |  8 ----
 drivers/media/usb/pwc/pwc-v4l.c               |  5 ---
 drivers/media/usb/s2255/s2255drv.c            |  8 ----
 drivers/media/usb/stk1160/stk1160-v4l.c       |  2 -
 drivers/media/usb/stk1160/stk1160.h           |  1 -
 drivers/media/usb/stkwebcam/stk-webcam.c      |  5 ---
 drivers/media/usb/tm6000/tm6000-video.c       |  4 --
 drivers/media/usb/tm6000/tm6000.h             |  1 -
 drivers/media/usb/usbtv/usbtv-video.c         |  2 -
 drivers/media/usb/usbvision/usbvision-video.c | 18 ++++-----
 drivers/media/usb/usbvision/usbvision.h       |  1 -
 drivers/media/usb/zr364xx/zr364xx.c           |  7 +---
 drivers/media/v4l2-core/v4l2-ioctl.c          | 29 +++++++++++---
 drivers/staging/media/omap4iss/iss_video.c    | 40 +++++++++----------
 drivers/staging/media/omap4iss/iss_video.h    |  2 -
 drivers/staging/media/soc_camera/soc_camera.c |  2 -
 .../bcm2835-camera/bcm2835-camera.c           | 29 --------------
 .../bcm2835-camera/mmal-common.h              |  1 -
 include/media/drv-intf/exynos-fimc.h          |  2 -
 include/media/drv-intf/saa7146_vv.h           |  1 -
 include/media/drv-intf/soc_mediabus.h         |  2 -
 90 files changed, 100 insertions(+), 566 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/5] v4l2-ioctl: add missing pixelformats
  2019-06-26 11:27 [PATCH 0/5] media: let v4l2-ioctl set the format description Hans Verkuil
@ 2019-06-26 11:27 ` Hans Verkuil
  2019-06-26 16:31   ` Laurent Pinchart
  2019-06-26 11:27 ` [PATCH 2/5] media/usb: don't set description in ENUM_FMT Hans Verkuil
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Hans Verkuil @ 2019-06-26 11:27 UTC (permalink / raw)
  To: linux-media; +Cc: Hans Verkuil, Laurent Pinchart

The v4l_fill_fmtdesc() is supposed to be updated whenever a new pixelformat
is added, but a bunch of recently added pixelformats were forgotten.

Update the list.

Also change a few lower case words to upper case to keep the same style.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/media/v4l2-core/v4l2-ioctl.c | 29 ++++++++++++++++++++++------
 1 file changed, 23 insertions(+), 6 deletions(-)

diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
index b1f4b991dba6..c1faa7ca1925 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -1169,9 +1169,21 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
 	case V4L2_PIX_FMT_RGB444:	descr = "16-bit A/XRGB 4-4-4-4"; break;
 	case V4L2_PIX_FMT_ARGB444:	descr = "16-bit ARGB 4-4-4-4"; break;
 	case V4L2_PIX_FMT_XRGB444:	descr = "16-bit XRGB 4-4-4-4"; break;
+	case V4L2_PIX_FMT_RGBA444:	descr = "16-bit RGBA 4-4-4-4"; break;
+	case V4L2_PIX_FMT_RGBX444:	descr = "16-bit RGBX 4-4-4-4"; break;
+	case V4L2_PIX_FMT_ABGR444:	descr = "16-bit ABGR 4-4-4-4"; break;
+	case V4L2_PIX_FMT_XBGR444:	descr = "16-bit XBGR 4-4-4-4"; break;
+	case V4L2_PIX_FMT_BGRA444:	descr = "16-bit BGRA 4-4-4-4"; break;
+	case V4L2_PIX_FMT_BGRX444:	descr = "16-bit BGRX 4-4-4-4"; break;
 	case V4L2_PIX_FMT_RGB555:	descr = "16-bit A/XRGB 1-5-5-5"; break;
 	case V4L2_PIX_FMT_ARGB555:	descr = "16-bit ARGB 1-5-5-5"; break;
 	case V4L2_PIX_FMT_XRGB555:	descr = "16-bit XRGB 1-5-5-5"; break;
+	case V4L2_PIX_FMT_ABGR555:	descr = "16-bit ABGR 1-5-5-5"; break;
+	case V4L2_PIX_FMT_XBGR555:	descr = "16-bit XBGR 1-5-5-5"; break;
+	case V4L2_PIX_FMT_RGBA555:	descr = "16-bit RGBA 1-5-5-5"; break;
+	case V4L2_PIX_FMT_RGBX555:	descr = "16-bit RGBX 1-5-5-5"; break;
+	case V4L2_PIX_FMT_BGRA555:	descr = "16-bit BGRA 1-5-5-5"; break;
+	case V4L2_PIX_FMT_BGRX555:	descr = "16-bit BGRX 1-5-5-5"; break;
 	case V4L2_PIX_FMT_RGB565:	descr = "16-bit RGB 5-6-5"; break;
 	case V4L2_PIX_FMT_RGB555X:	descr = "16-bit A/XRGB 1-5-5-5 BE"; break;
 	case V4L2_PIX_FMT_ARGB555X:	descr = "16-bit ARGB 1-5-5-5 BE"; break;
@@ -1186,6 +1198,10 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
 	case V4L2_PIX_FMT_RGB32:	descr = "32-bit A/XRGB 8-8-8-8"; break;
 	case V4L2_PIX_FMT_ARGB32:	descr = "32-bit ARGB 8-8-8-8"; break;
 	case V4L2_PIX_FMT_XRGB32:	descr = "32-bit XRGB 8-8-8-8"; break;
+	case V4L2_PIX_FMT_BGRA32:	descr = "32-bit ABGR 8-8-8-8"; break;
+	case V4L2_PIX_FMT_BGRX32:	descr = "32-bit XBGR 8-8-8-8"; break;
+	case V4L2_PIX_FMT_RGBA32:	descr = "32-bit RGBA 8-8-8-8"; break;
+	case V4L2_PIX_FMT_RGBX32:	descr = "32-bit RGBX 8-8-8-8"; break;
 	case V4L2_PIX_FMT_GREY:		descr = "8-bit Greyscale"; break;
 	case V4L2_PIX_FMT_Y4:		descr = "4-bit Greyscale"; break;
 	case V4L2_PIX_FMT_Y6:		descr = "6-bit Greyscale"; break;
@@ -1301,13 +1317,14 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
 	case V4L2_SDR_FMT_PCU16BE:	descr = "Planar Complex U16BE"; break;
 	case V4L2_SDR_FMT_PCU18BE:	descr = "Planar Complex U18BE"; break;
 	case V4L2_SDR_FMT_PCU20BE:	descr = "Planar Complex U20BE"; break;
-	case V4L2_TCH_FMT_DELTA_TD16:	descr = "16-bit signed deltas"; break;
-	case V4L2_TCH_FMT_DELTA_TD08:	descr = "8-bit signed deltas"; break;
-	case V4L2_TCH_FMT_TU16:		descr = "16-bit unsigned touch data"; break;
-	case V4L2_TCH_FMT_TU08:		descr = "8-bit unsigned touch data"; break;
+	case V4L2_TCH_FMT_DELTA_TD16:	descr = "16-bit Signed Deltas"; break;
+	case V4L2_TCH_FMT_DELTA_TD08:	descr = "8-bit Signed Deltas"; break;
+	case V4L2_TCH_FMT_TU16:		descr = "16-bit Unsigned Touch Data"; break;
+	case V4L2_TCH_FMT_TU08:		descr = "8-bit Unsigned Touch Data"; break;
 	case V4L2_META_FMT_VSP1_HGO:	descr = "R-Car VSP1 1-D Histogram"; break;
 	case V4L2_META_FMT_VSP1_HGT:	descr = "R-Car VSP1 2-D Histogram"; break;
-	case V4L2_META_FMT_UVC:		descr = "UVC payload header metadata"; break;
+	case V4L2_META_FMT_UVC:		descr = "UVC Payload Header Metadata"; break;
+	case V4L2_META_FMT_D4XX:	descr = "Intel D4xx UVC Metadata"; break;
 
 	default:
 		/* Compressed formats */
@@ -1326,7 +1343,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
 		case V4L2_PIX_FMT_MPEG1:	descr = "MPEG-1 ES"; break;
 		case V4L2_PIX_FMT_MPEG2:	descr = "MPEG-2 ES"; break;
 		case V4L2_PIX_FMT_MPEG2_SLICE:	descr = "MPEG-2 Parsed Slice Data"; break;
-		case V4L2_PIX_FMT_MPEG4:	descr = "MPEG-4 part 2 ES"; break;
+		case V4L2_PIX_FMT_MPEG4:	descr = "MPEG-4 Part 2 ES"; break;
 		case V4L2_PIX_FMT_XVID:		descr = "Xvid"; break;
 		case V4L2_PIX_FMT_VC1_ANNEX_G:	descr = "VC-1 (SMPTE 412M Annex G)"; break;
 		case V4L2_PIX_FMT_VC1_ANNEX_L:	descr = "VC-1 (SMPTE 412M Annex L)"; break;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/5] media/usb: don't set description in ENUM_FMT
  2019-06-26 11:27 [PATCH 0/5] media: let v4l2-ioctl set the format description Hans Verkuil
  2019-06-26 11:27 ` [PATCH 1/5] v4l2-ioctl: add missing pixelformats Hans Verkuil
@ 2019-06-26 11:27 ` Hans Verkuil
  2019-06-26 11:27 ` [PATCH 3/5] media/pci: don't set description for ENUM_FMT Hans Verkuil
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 12+ messages in thread
From: Hans Verkuil @ 2019-06-26 11:27 UTC (permalink / raw)
  To: linux-media; +Cc: Hans Verkuil, Antti Palosaari

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>
Cc: Antti Palosaari <crope@iki.fi>
---
 drivers/media/dvb-frontends/rtl2832_sdr.c     |  3 ---
 drivers/media/usb/airspy/airspy.c             |  3 ---
 drivers/media/usb/au0828/au0828-video.c       |  4 ----
 drivers/media/usb/cpia2/cpia2_v4l.c           | 23 ++++---------------
 drivers/media/usb/cx231xx/cx231xx-417.c       |  1 -
 drivers/media/usb/cx231xx/cx231xx-video.c     |  2 --
 drivers/media/usb/cx231xx/cx231xx.h           |  1 -
 drivers/media/usb/em28xx/em28xx-video.c       |  8 -------
 drivers/media/usb/em28xx/em28xx.h             |  2 --
 drivers/media/usb/go7007/go7007-v4l2.c        | 11 ---------
 drivers/media/usb/gspca/gspca.c               |  9 --------
 drivers/media/usb/hdpvr/hdpvr-video.c         |  3 ---
 drivers/media/usb/msi2500/msi2500.c           |  8 -------
 drivers/media/usb/pwc/pwc-v4l.c               |  5 ----
 drivers/media/usb/s2255/s2255drv.c            |  8 -------
 drivers/media/usb/stk1160/stk1160-v4l.c       |  2 --
 drivers/media/usb/stk1160/stk1160.h           |  1 -
 drivers/media/usb/stkwebcam/stk-webcam.c      |  5 ----
 drivers/media/usb/tm6000/tm6000-video.c       |  4 ----
 drivers/media/usb/tm6000/tm6000.h             |  1 -
 drivers/media/usb/usbtv/usbtv-video.c         |  2 --
 drivers/media/usb/usbvision/usbvision-video.c | 18 +++++++--------
 drivers/media/usb/usbvision/usbvision.h       |  1 -
 drivers/media/usb/zr364xx/zr364xx.c           |  7 +-----
 24 files changed, 13 insertions(+), 119 deletions(-)

diff --git a/drivers/media/dvb-frontends/rtl2832_sdr.c b/drivers/media/dvb-frontends/rtl2832_sdr.c
index e05c21d35dc8..60d1e59d2292 100644
--- a/drivers/media/dvb-frontends/rtl2832_sdr.c
+++ b/drivers/media/dvb-frontends/rtl2832_sdr.c
@@ -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;
diff --git a/drivers/media/usb/airspy/airspy.c b/drivers/media/usb/airspy/airspy.c
index b35231ffe503..751703db06f5 100644
--- a/drivers/media/usb/airspy/airspy.c
+++ b/drivers/media/usb/airspy/airspy.c
@@ -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;
diff --git a/drivers/media/usb/au0828/au0828-video.c b/drivers/media/usb/au0828/au0828-video.c
index 5e00019bce8a..e390ca57520a 100644
--- a/drivers/media/usb/au0828/au0828-video.c
+++ b/drivers/media/usb/au0828/au0828-video.c
@@ -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;
diff --git a/drivers/media/usb/cpia2/cpia2_v4l.c b/drivers/media/usb/cpia2/cpia2_v4l.c
index 0feae825cebb..ded7eb2dc40a 100644
--- a/drivers/media/usb/cpia2/cpia2_v4l.c
+++ b/drivers/media/usb/cpia2/cpia2_v4l.c
@@ -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;
 }
 
diff --git a/drivers/media/usb/cx231xx/cx231xx-417.c b/drivers/media/usb/cx231xx/cx231xx-417.c
index 2475f69a2f1c..30624376679b 100644
--- a/drivers/media/usb/cx231xx/cx231xx-417.c
+++ b/drivers/media/usb/cx231xx/cx231xx-417.c
@@ -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;
diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c
index b651ac7713ea..c77597917ca1 100644
--- a/drivers/media/usb/cx231xx/cx231xx-video.c
+++ b/drivers/media/usb/cx231xx/cx231xx-video.c
@@ -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;
diff --git a/drivers/media/usb/cx231xx/cx231xx.h b/drivers/media/usb/cx231xx/cx231xx.h
index 3efa8ff93c1c..b007611abc37 100644
--- a/drivers/media/usb/cx231xx/cx231xx.h
+++ b/drivers/media/usb/cx231xx/cx231xx.h
@@ -121,7 +121,6 @@
 #define CX23417_RESET    9
 
 struct cx23417_fmt {
-	char  *name;
 	u32   fourcc;          /* v4l2 format id */
 	int   depth;
 	int   flags;
diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c
index 0512e1959394..82eb1550ec3b 100644
--- a/drivers/media/usb/em28xx/em28xx-video.c
+++ b/drivers/media/usb/em28xx/em28xx-video.c
@@ -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;
diff --git a/drivers/media/usb/em28xx/em28xx.h b/drivers/media/usb/em28xx/em28xx.h
index a551072e62ed..c69e0bc46eb7 100644
--- a/drivers/media/usb/em28xx/em28xx.h
+++ b/drivers/media/usb/em28xx/em28xx.h
@@ -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;
diff --git a/drivers/media/usb/go7007/go7007-v4l2.c b/drivers/media/usb/go7007/go7007-v4l2.c
index 88edfef80b40..0b3d185f3cb0 100644
--- a/drivers/media/usb/go7007/go7007-v4l2.c
+++ b/drivers/media/usb/go7007/go7007-v4l2.c
@@ -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;
 }
 
diff --git a/drivers/media/usb/gspca/gspca.c b/drivers/media/usb/gspca/gspca.c
index be11f7830bca..83b78a42414e 100644
--- a/drivers/media/usb/gspca/gspca.c
+++ b/drivers/media/usb/gspca/gspca.c
@@ -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;
 }
 
diff --git a/drivers/media/usb/hdpvr/hdpvr-video.c b/drivers/media/usb/hdpvr/hdpvr-video.c
index 5b3e67b80627..bad71d863d39 100644
--- a/drivers/media/usb/hdpvr/hdpvr-video.c
+++ b/drivers/media/usb/hdpvr/hdpvr-video.c
@@ -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;
diff --git a/drivers/media/usb/msi2500/msi2500.c b/drivers/media/usb/msi2500/msi2500.c
index 4c9b2a12acfb..65be6f140fe8 100644
--- a/drivers/media/usb/msi2500/msi2500.c
+++ b/drivers/media/usb/msi2500/msi2500.c
@@ -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;
diff --git a/drivers/media/usb/pwc/pwc-v4l.c b/drivers/media/usb/pwc/pwc-v4l.c
index 76c498cccc49..2f135d533af6 100644
--- a/drivers/media/usb/pwc/pwc-v4l.c
+++ b/drivers/media/usb/pwc/pwc-v4l.c
@@ -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;
diff --git a/drivers/media/usb/s2255/s2255drv.c b/drivers/media/usb/s2255/s2255drv.c
index aa90558479f7..533f7f064a44 100644
--- a/drivers/media/usb/s2255/s2255drv.c
+++ b/drivers/media/usb/s2255/s2255drv.c
@@ -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;
 }
diff --git a/drivers/media/usb/stk1160/stk1160-v4l.c b/drivers/media/usb/stk1160/stk1160-v4l.c
index b71a0f4b40b5..bcd14c66e8df 100644
--- a/drivers/media/usb/stk1160/stk1160-v4l.c
+++ b/drivers/media/usb/stk1160/stk1160-v4l.c
@@ -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;
 }
diff --git a/drivers/media/usb/stk1160/stk1160.h b/drivers/media/usb/stk1160/stk1160.h
index 099ce2a2f021..a31ea1c80f25 100644
--- a/drivers/media/usb/stk1160/stk1160.h
+++ b/drivers/media/usb/stk1160/stk1160.h
@@ -102,7 +102,6 @@ struct stk1160_isoc_ctl {
 };
 
 struct stk1160_fmt {
-	char  *name;
 	u32   fourcc;          /* v4l2 format id */
 	int   depth;
 };
diff --git a/drivers/media/usb/stkwebcam/stk-webcam.c b/drivers/media/usb/stkwebcam/stk-webcam.c
index be8041e3e6b8..cfca3c70599b 100644
--- a/drivers/media/usb/stkwebcam/stk-webcam.c
+++ b/drivers/media/usb/stkwebcam/stk-webcam.c
@@ -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;
diff --git a/drivers/media/usb/tm6000/tm6000-video.c b/drivers/media/usb/tm6000/tm6000-video.c
index 85fcddfb0202..c07a81a6cbe2 100644
--- a/drivers/media/usb/tm6000/tm6000-video.c
+++ b/drivers/media/usb/tm6000/tm6000-video.c
@@ -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;
 }
diff --git a/drivers/media/usb/tm6000/tm6000.h b/drivers/media/usb/tm6000/tm6000.h
index 0864ed7314eb..bf396544da9a 100644
--- a/drivers/media/usb/tm6000/tm6000.h
+++ b/drivers/media/usb/tm6000/tm6000.h
@@ -64,7 +64,6 @@ struct tm6000_input {
  */
 
 struct tm6000_fmt {
-	char  *name;
 	u32   fourcc;          /* v4l2 format id */
 	int   depth;
 };
diff --git a/drivers/media/usb/usbtv/usbtv-video.c b/drivers/media/usb/usbtv/usbtv-video.c
index 51f784479e91..3d9284a09ee5 100644
--- a/drivers/media/usb/usbtv/usbtv-video.c
+++ b/drivers/media/usb/usbtv/usbtv-video.c
@@ -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;
 }
diff --git a/drivers/media/usb/usbvision/usbvision-video.c b/drivers/media/usb/usbvision/usbvision-video.c
index 93750af82d98..0874526f599e 100644
--- a/drivers/media/usb/usbvision/usbvision-video.c
+++ b/drivers/media/usb/usbvision/usbvision-video.c
@@ -87,14 +87,14 @@
 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;
 }
diff --git a/drivers/media/usb/usbvision/usbvision.h b/drivers/media/usb/usbvision/usbvision.h
index 4198f972a47b..11539578e8d2 100644
--- a/drivers/media/usb/usbvision/usbvision.h
+++ b/drivers/media/usb/usbvision/usbvision.h
@@ -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)
 
diff --git a/drivers/media/usb/zr364xx/zr364xx.c b/drivers/media/usb/zr364xx/zr364xx.c
index a9bcba4fa9c6..b8e89d550d29 100644
--- a/drivers/media/usb/zr364xx/zr364xx.c
+++ b/drivers/media/usb/zr364xx/zr364xx.c
@@ -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;
 }
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/5] media/pci: don't set description for ENUM_FMT
  2019-06-26 11:27 [PATCH 0/5] media: let v4l2-ioctl set the format description Hans Verkuil
  2019-06-26 11:27 ` [PATCH 1/5] v4l2-ioctl: add missing pixelformats Hans Verkuil
  2019-06-26 11:27 ` [PATCH 2/5] media/usb: don't set description in ENUM_FMT Hans Verkuil
@ 2019-06-26 11:27 ` Hans Verkuil
  2019-06-26 11:27 ` [PATCH 4/5] drivers/staging/media: " Hans Verkuil
  2019-06-26 11:27 ` [PATCH 5/5] media/platform: don't set description in ENUM_FMT Hans Verkuil
  4 siblings, 0 replies; 12+ messages in thread
From: Hans Verkuil @ 2019-06-26 11:27 UTC (permalink / raw)
  To: linux-media; +Cc: Hans Verkuil

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>
---
 drivers/media/common/saa7146/saa7146_video.c  | 16 ++---------
 drivers/media/pci/bt8xx/bttv-driver.c         | 19 -------------
 drivers/media/pci/bt8xx/bttv-risc.c           |  8 +++---
 drivers/media/pci/bt8xx/bttvp.h               |  1 -
 drivers/media/pci/cobalt/cobalt-v4l2.c        |  5 ----
 drivers/media/pci/cx23885/cx23885-417.c       |  1 -
 drivers/media/pci/cx23885/cx23885-video.c     |  7 ++---
 drivers/media/pci/cx23885/cx23885.h           |  1 -
 drivers/media/pci/cx25821/cx25821-video.c     |  7 ++---
 drivers/media/pci/cx25821/cx25821.h           |  1 -
 drivers/media/pci/cx88/cx88-blackbird.c       |  2 --
 drivers/media/pci/cx88/cx88-video.c           | 17 ++---------
 drivers/media/pci/cx88/cx88.h                 |  1 -
 drivers/media/pci/dt3155/dt3155.c             |  1 -
 drivers/media/pci/meye/meye.c                 |  3 --
 drivers/media/pci/saa7134/saa7134-empress.c   |  2 --
 drivers/media/pci/saa7134/saa7134-video.c     | 28 +++----------------
 drivers/media/pci/saa7134/saa7134.h           |  1 -
 drivers/media/pci/saa7164/saa7164-encoder.c   |  1 -
 .../media/pci/solo6x10/solo6x10-v4l2-enc.c    |  7 -----
 drivers/media/pci/solo6x10/solo6x10-v4l2.c    |  2 --
 drivers/media/pci/sta2x11/sta2x11_vip.c       |  2 --
 drivers/media/pci/tw68/tw68-video.c           | 13 ---------
 drivers/media/pci/tw68/tw68.h                 |  1 -
 include/media/drv-intf/saa7146_vv.h           |  1 -
 25 files changed, 17 insertions(+), 131 deletions(-)

diff --git a/drivers/media/common/saa7146/saa7146_video.c b/drivers/media/common/saa7146/saa7146_video.c
index 4c399a42e874..d16122039b0c 100644
--- a/drivers/media/common/saa7146/saa7146_video.c
+++ b/drivers/media/common/saa7146/saa7146_video.c
@@ -20,62 +20,52 @@ MODULE_PARM_DESC(max_memory, "maximum memory usage for capture buffers (default:
 /* format descriptions for capture and preview */
 static struct saa7146_format formats[] = {
 	{
-		.name		= "RGB-8 (3-3-2)",
 		.pixelformat	= V4L2_PIX_FMT_RGB332,
 		.trans		= RGB08_COMPOSED,
 		.depth		= 8,
 		.flags		= 0,
 	}, {
-		.name		= "RGB-16 (5/B-6/G-5/R)",
 		.pixelformat	= V4L2_PIX_FMT_RGB565,
 		.trans		= RGB16_COMPOSED,
 		.depth		= 16,
 		.flags		= 0,
 	}, {
-		.name		= "RGB-24 (B-G-R)",
 		.pixelformat	= V4L2_PIX_FMT_BGR24,
 		.trans		= RGB24_COMPOSED,
 		.depth		= 24,
 		.flags		= 0,
 	}, {
-		.name		= "RGB-32 (B-G-R)",
 		.pixelformat	= V4L2_PIX_FMT_BGR32,
 		.trans		= RGB32_COMPOSED,
 		.depth		= 32,
 		.flags		= 0,
 	}, {
-		.name		= "RGB-32 (R-G-B)",
 		.pixelformat	= V4L2_PIX_FMT_RGB32,
 		.trans		= RGB32_COMPOSED,
 		.depth		= 32,
 		.flags		= 0,
 		.swap		= 0x2,
 	}, {
-		.name		= "Greyscale-8",
 		.pixelformat	= V4L2_PIX_FMT_GREY,
 		.trans		= Y8,
 		.depth		= 8,
 		.flags		= 0,
 	}, {
-		.name		= "YUV 4:2:2 planar (Y-Cb-Cr)",
 		.pixelformat	= V4L2_PIX_FMT_YUV422P,
 		.trans		= YUV422_DECOMPOSED,
 		.depth		= 16,
 		.flags		= FORMAT_BYTE_SWAP|FORMAT_IS_PLANAR,
 	}, {
-		.name		= "YVU 4:2:0 planar (Y-Cb-Cr)",
 		.pixelformat	= V4L2_PIX_FMT_YVU420,
 		.trans		= YUV420_DECOMPOSED,
 		.depth		= 12,
 		.flags		= FORMAT_BYTE_SWAP|FORMAT_IS_PLANAR,
 	}, {
-		.name		= "YUV 4:2:0 planar (Y-Cb-Cr)",
 		.pixelformat	= V4L2_PIX_FMT_YUV420,
 		.trans		= YUV420_DECOMPOSED,
 		.depth		= 12,
 		.flags		= FORMAT_IS_PLANAR,
 	}, {
-		.name		= "YUV 4:2:2 (U-Y-V-Y)",
 		.pixelformat	= V4L2_PIX_FMT_UYVY,
 		.trans		= YUV422_COMPOSED,
 		.depth		= 16,
@@ -147,10 +137,10 @@ int saa7146_start_preview(struct saa7146_fh *fh)
 	}
 	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.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))) {
 		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
 {
 	if (f->index >= ARRAY_SIZE(formats))
 		return -EINVAL;
-	strscpy((char *)f->description, formats[f->index].name,
-		sizeof(f->description));
 	f->pixelformat = formats[f->index].pixelformat;
 	return 0;
 }
diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c
index 612d1c0010c1..a359da7773a9 100644
--- a/drivers/media/pci/bt8xx/bttv-driver.c
+++ b/drivers/media/pci/bt8xx/bttv-driver.c
@@ -503,77 +503,65 @@ static const unsigned int BTTV_TVNORMS = ARRAY_SIZE(bttv_tvnorms);
    packed pixel formats must come first */
 static const struct bttv_format formats[] = {
 	{
-		.name     = "8 bpp, gray",
 		.fourcc   = V4L2_PIX_FMT_GREY,
 		.btformat = BT848_COLOR_FMT_Y8,
 		.depth    = 8,
 		.flags    = FORMAT_FLAGS_PACKED,
 	},{
-		.name     = "8 bpp, dithered color",
 		.fourcc   = V4L2_PIX_FMT_HI240,
 		.btformat = BT848_COLOR_FMT_RGB8,
 		.depth    = 8,
 		.flags    = FORMAT_FLAGS_PACKED | FORMAT_FLAGS_DITHER,
 	},{
-		.name     = "15 bpp RGB, le",
 		.fourcc   = V4L2_PIX_FMT_RGB555,
 		.btformat = BT848_COLOR_FMT_RGB15,
 		.depth    = 16,
 		.flags    = FORMAT_FLAGS_PACKED,
 	},{
-		.name     = "15 bpp RGB, be",
 		.fourcc   = V4L2_PIX_FMT_RGB555X,
 		.btformat = BT848_COLOR_FMT_RGB15,
 		.btswap   = 0x03, /* byteswap */
 		.depth    = 16,
 		.flags    = FORMAT_FLAGS_PACKED,
 	},{
-		.name     = "16 bpp RGB, le",
 		.fourcc   = V4L2_PIX_FMT_RGB565,
 		.btformat = BT848_COLOR_FMT_RGB16,
 		.depth    = 16,
 		.flags    = FORMAT_FLAGS_PACKED,
 	},{
-		.name     = "16 bpp RGB, be",
 		.fourcc   = V4L2_PIX_FMT_RGB565X,
 		.btformat = BT848_COLOR_FMT_RGB16,
 		.btswap   = 0x03, /* byteswap */
 		.depth    = 16,
 		.flags    = FORMAT_FLAGS_PACKED,
 	},{
-		.name     = "24 bpp RGB, le",
 		.fourcc   = V4L2_PIX_FMT_BGR24,
 		.btformat = BT848_COLOR_FMT_RGB24,
 		.depth    = 24,
 		.flags    = FORMAT_FLAGS_PACKED,
 	},{
-		.name     = "32 bpp RGB, le",
 		.fourcc   = V4L2_PIX_FMT_BGR32,
 		.btformat = BT848_COLOR_FMT_RGB32,
 		.depth    = 32,
 		.flags    = FORMAT_FLAGS_PACKED,
 	},{
-		.name     = "32 bpp RGB, be",
 		.fourcc   = V4L2_PIX_FMT_RGB32,
 		.btformat = BT848_COLOR_FMT_RGB32,
 		.btswap   = 0x0f, /* byte+word swap */
 		.depth    = 32,
 		.flags    = FORMAT_FLAGS_PACKED,
 	},{
-		.name     = "4:2:2, packed, YUYV",
 		.fourcc   = V4L2_PIX_FMT_YUYV,
 		.btformat = BT848_COLOR_FMT_YUY2,
 		.depth    = 16,
 		.flags    = FORMAT_FLAGS_PACKED,
 	},{
-		.name     = "4:2:2, packed, UYVY",
 		.fourcc   = V4L2_PIX_FMT_UYVY,
 		.btformat = BT848_COLOR_FMT_YUY2,
 		.btswap   = 0x03, /* byteswap */
 		.depth    = 16,
 		.flags    = FORMAT_FLAGS_PACKED,
 	},{
-		.name     = "4:2:2, planar, Y-Cb-Cr",
 		.fourcc   = V4L2_PIX_FMT_YUV422P,
 		.btformat = BT848_COLOR_FMT_YCrCb422,
 		.depth    = 16,
@@ -581,7 +569,6 @@ static const struct bttv_format formats[] = {
 		.hshift   = 1,
 		.vshift   = 0,
 	},{
-		.name     = "4:2:0, planar, Y-Cb-Cr",
 		.fourcc   = V4L2_PIX_FMT_YUV420,
 		.btformat = BT848_COLOR_FMT_YCrCb422,
 		.depth    = 12,
@@ -589,7 +576,6 @@ static const struct bttv_format formats[] = {
 		.hshift   = 1,
 		.vshift   = 1,
 	},{
-		.name     = "4:2:0, planar, Y-Cr-Cb",
 		.fourcc   = V4L2_PIX_FMT_YVU420,
 		.btformat = BT848_COLOR_FMT_YCrCb422,
 		.depth    = 12,
@@ -597,7 +583,6 @@ static const struct bttv_format formats[] = {
 		.hshift   = 1,
 		.vshift   = 1,
 	},{
-		.name     = "4:1:1, planar, Y-Cb-Cr",
 		.fourcc   = V4L2_PIX_FMT_YUV411P,
 		.btformat = BT848_COLOR_FMT_YCrCb411,
 		.depth    = 12,
@@ -605,7 +590,6 @@ static const struct bttv_format formats[] = {
 		.hshift   = 2,
 		.vshift   = 0,
 	},{
-		.name     = "4:1:0, planar, Y-Cb-Cr",
 		.fourcc   = V4L2_PIX_FMT_YUV410,
 		.btformat = BT848_COLOR_FMT_YCrCb411,
 		.depth    = 9,
@@ -613,7 +597,6 @@ static const struct bttv_format formats[] = {
 		.hshift   = 2,
 		.vshift   = 2,
 	},{
-		.name     = "4:1:0, planar, Y-Cr-Cb",
 		.fourcc   = V4L2_PIX_FMT_YVU410,
 		.btformat = BT848_COLOR_FMT_YCrCb411,
 		.depth    = 9,
@@ -621,7 +604,6 @@ static const struct bttv_format formats[] = {
 		.hshift   = 2,
 		.vshift   = 2,
 	},{
-		.name     = "raw scanlines",
 		.fourcc   = -1,
 		.btformat = BT848_COLOR_FMT_RAW,
 		.depth    = 8,
@@ -2500,7 +2482,6 @@ static int bttv_enum_fmt_cap_ovr(struct v4l2_fmtdesc *f)
 		return -EINVAL;
 
 	f->pixelformat = formats[i].fourcc;
-	strscpy(f->description, formats[i].name, sizeof(f->description));
 
 	return i;
 }
diff --git a/drivers/media/pci/bt8xx/bttv-risc.c b/drivers/media/pci/bt8xx/bttv-risc.c
index 6b59ca337c7f..fc8708047be8 100644
--- a/drivers/media/pci/bt8xx/bttv-risc.c
+++ b/drivers/media/pci/bt8xx/bttv-risc.c
@@ -699,9 +699,9 @@ bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf)
 	const struct bttv_tvnorm *tvnorm = bttv_tvnorms + buf->tvnorm;
 	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],
-		buf->fmt->name, buf->vb.width, buf->vb.height);
+		buf->fmt->fourcc, buf->vb.width, buf->vb.height);
 
 	/* packed pixel modes */
 	if (buf->fmt->flags & FORMAT_FLAGS_PACKED) {
@@ -860,9 +860,9 @@ bttv_overlay_risc(struct bttv *btv,
 		  struct bttv_buffer *buf)
 {
 	/* 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],
-		fmt->name, ov->w.width, ov->w.height);
+		fmt->fourcc, ov->w.width, ov->w.height);
 
 	/* calculate geometry */
 	bttv_calc_geo(btv,&buf->geo,ov->w.width,ov->w.height,
diff --git a/drivers/media/pci/bt8xx/bttvp.h b/drivers/media/pci/bt8xx/bttvp.h
index b159d6ddbfcf..4abf43657846 100644
--- a/drivers/media/pci/bt8xx/bttvp.h
+++ b/drivers/media/pci/bt8xx/bttvp.h
@@ -99,7 +99,6 @@ struct bttv_tvnorm {
 extern const struct bttv_tvnorm bttv_tvnorms[];
 
 struct bttv_format {
-	char *name;
 	int  fourcc;          /* video4linux 2      */
 	int  btformat;        /* BT848_COLOR_FMT_*  */
 	int  btswap;          /* BT848_COLOR_CTL_*  */
diff --git a/drivers/media/pci/cobalt/cobalt-v4l2.c b/drivers/media/pci/cobalt/cobalt-v4l2.c
index 39dabd4da60f..ea96f333ee2b 100644
--- a/drivers/media/pci/cobalt/cobalt-v4l2.c
+++ b/drivers/media/pci/cobalt/cobalt-v4l2.c
@@ -688,15 +688,12 @@ static int cobalt_enum_fmt_vid_cap(struct file *file, void *priv_fh,
 {
 	switch (f->index) {
 	case 0:
-		strscpy(f->description, "YUV 4:2:2", sizeof(f->description));
 		f->pixelformat = V4L2_PIX_FMT_YUYV;
 		break;
 	case 1:
-		strscpy(f->description, "RGB24", sizeof(f->description));
 		f->pixelformat = V4L2_PIX_FMT_RGB24;
 		break;
 	case 2:
-		strscpy(f->description, "RGB32", sizeof(f->description));
 		f->pixelformat = V4L2_PIX_FMT_BGR32;
 		break;
 	default:
@@ -893,11 +890,9 @@ static int cobalt_enum_fmt_vid_out(struct file *file, void *priv_fh,
 {
 	switch (f->index) {
 	case 0:
-		strscpy(f->description, "YUV 4:2:2", sizeof(f->description));
 		f->pixelformat = V4L2_PIX_FMT_YUYV;
 		break;
 	case 1:
-		strscpy(f->description, "RGB32", sizeof(f->description));
 		f->pixelformat = V4L2_PIX_FMT_BGR32;
 		break;
 	default:
diff --git a/drivers/media/pci/cx23885/cx23885-417.c b/drivers/media/pci/cx23885/cx23885-417.c
index 82f96a4091ac..2327fe612610 100644
--- a/drivers/media/pci/cx23885/cx23885-417.c
+++ b/drivers/media/pci/cx23885/cx23885-417.c
@@ -1339,7 +1339,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;
diff --git a/drivers/media/pci/cx23885/cx23885-video.c b/drivers/media/pci/cx23885/cx23885-video.c
index b254473db9a3..8098b15493de 100644
--- a/drivers/media/pci/cx23885/cx23885-video.c
+++ b/drivers/media/pci/cx23885/cx23885-video.c
@@ -67,7 +67,6 @@ MODULE_PARM_DESC(vid_limit, "capture memory limit in megabytes");
 #define FORMAT_FLAGS_PACKED       0x01
 static struct cx23885_fmt formats[] = {
 	{
-		.name     = "4:2:2, packed, YUYV",
 		.fourcc   = V4L2_PIX_FMT_YUYV,
 		.depth    = 16,
 		.flags    = FORMAT_FLAGS_PACKED,
@@ -411,9 +410,9 @@ static int buffer_prepare(struct vb2_buffer *vb)
 	default:
 		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,
-		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);
 	return 0;
 }
@@ -647,8 +646,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void  *priv,
 	if (unlikely(f->index >= ARRAY_SIZE(formats)))
 		return -EINVAL;
 
-	strscpy(f->description, formats[f->index].name,
-		sizeof(f->description));
 	f->pixelformat = formats[f->index].fourcc;
 
 	return 0;
diff --git a/drivers/media/pci/cx23885/cx23885.h b/drivers/media/pci/cx23885/cx23885.h
index 9da66fdd5a0d..a95a2e4c6a0d 100644
--- a/drivers/media/pci/cx23885/cx23885.h
+++ b/drivers/media/pci/cx23885/cx23885.h
@@ -127,7 +127,6 @@
 	V4L2_STD_PAL_60 |  V4L2_STD_SECAM_L   |  V4L2_STD_SECAM_DK)
 
 struct cx23885_fmt {
-	char  *name;
 	u32   fourcc;          /* v4l2 format id */
 	int   depth;
 	int   flags;
diff --git a/drivers/media/pci/cx25821/cx25821-video.c b/drivers/media/pci/cx25821/cx25821-video.c
index de7641170478..a10261da0db6 100644
--- a/drivers/media/pci/cx25821/cx25821-video.c
+++ b/drivers/media/pci/cx25821/cx25821-video.c
@@ -35,12 +35,10 @@ MODULE_PARM_DESC(irq_debug, "enable debug messages [IRQ handler]");
 
 static const struct cx25821_fmt formats[] = {
 	{
-		.name = "4:1:1, packed, Y41P",
 		.fourcc = V4L2_PIX_FMT_Y41P,
 		.depth = 12,
 		.flags = FORMAT_FLAGS_PACKED,
 	}, {
-		.name = "4:2:2, packed, YUYV",
 		.fourcc = V4L2_PIX_FMT_YUYV,
 		.depth = 16,
 		.flags = FORMAT_FLAGS_PACKED,
@@ -215,9 +213,9 @@ static int cx25821_buffer_prepare(struct vb2_buffer *vb)
 		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,
-		chan->fmt->depth, chan->fmt->name,
+		chan->fmt->depth, chan->fmt->fourcc,
 		(unsigned long)buf->risc.dma);
 
 	return ret;
@@ -311,7 +309,6 @@ static int cx25821_vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
 	if (unlikely(f->index >= ARRAY_SIZE(formats)))
 		return -EINVAL;
 
-	strscpy(f->description, formats[f->index].name, sizeof(f->description));
 	f->pixelformat = formats[f->index].fourcc;
 
 	return 0;
diff --git a/drivers/media/pci/cx25821/cx25821.h b/drivers/media/pci/cx25821/cx25821.h
index 47dbaae78509..017307984094 100644
--- a/drivers/media/pci/cx25821/cx25821.h
+++ b/drivers/media/pci/cx25821/cx25821.h
@@ -83,7 +83,6 @@
 #define VID_CHANNEL_NUM 8
 
 struct cx25821_fmt {
-	char *name;
 	u32 fourcc;		/* v4l2 format id */
 	int depth;
 	int flags;
diff --git a/drivers/media/pci/cx88/cx88-blackbird.c b/drivers/media/pci/cx88/cx88-blackbird.c
index 200d68827073..d3da7f4297af 100644
--- a/drivers/media/pci/cx88/cx88-blackbird.c
+++ b/drivers/media/pci/cx88/cx88-blackbird.c
@@ -805,9 +805,7 @@ 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;
-	f->flags = V4L2_FMT_FLAG_COMPRESSED;
 	return 0;
 }
 
diff --git a/drivers/media/pci/cx88/cx88-video.c b/drivers/media/pci/cx88/cx88-video.c
index e59a74514c7c..dcc0f02aeb70 100644
--- a/drivers/media/pci/cx88/cx88-video.c
+++ b/drivers/media/pci/cx88/cx88-video.c
@@ -69,62 +69,52 @@ MODULE_PARM_DESC(irq_debug, "enable debug messages [IRQ handler]");
 
 static const struct cx8800_fmt formats[] = {
 	{
-		.name     = "8 bpp, gray",
 		.fourcc   = V4L2_PIX_FMT_GREY,
 		.cxformat = ColorFormatY8,
 		.depth    = 8,
 		.flags    = FORMAT_FLAGS_PACKED,
 	}, {
-		.name     = "15 bpp RGB, le",
 		.fourcc   = V4L2_PIX_FMT_RGB555,
 		.cxformat = ColorFormatRGB15,
 		.depth    = 16,
 		.flags    = FORMAT_FLAGS_PACKED,
 	}, {
-		.name     = "15 bpp RGB, be",
 		.fourcc   = V4L2_PIX_FMT_RGB555X,
 		.cxformat = ColorFormatRGB15 | ColorFormatBSWAP,
 		.depth    = 16,
 		.flags    = FORMAT_FLAGS_PACKED,
 	}, {
-		.name     = "16 bpp RGB, le",
 		.fourcc   = V4L2_PIX_FMT_RGB565,
 		.cxformat = ColorFormatRGB16,
 		.depth    = 16,
 		.flags    = FORMAT_FLAGS_PACKED,
 	}, {
-		.name     = "16 bpp RGB, be",
 		.fourcc   = V4L2_PIX_FMT_RGB565X,
 		.cxformat = ColorFormatRGB16 | ColorFormatBSWAP,
 		.depth    = 16,
 		.flags    = FORMAT_FLAGS_PACKED,
 	}, {
-		.name     = "24 bpp RGB, le",
 		.fourcc   = V4L2_PIX_FMT_BGR24,
 		.cxformat = ColorFormatRGB24,
 		.depth    = 24,
 		.flags    = FORMAT_FLAGS_PACKED,
 	}, {
-		.name     = "32 bpp RGB, le",
 		.fourcc   = V4L2_PIX_FMT_BGR32,
 		.cxformat = ColorFormatRGB32,
 		.depth    = 32,
 		.flags    = FORMAT_FLAGS_PACKED,
 	}, {
-		.name     = "32 bpp RGB, be",
 		.fourcc   = V4L2_PIX_FMT_RGB32,
 		.cxformat = ColorFormatRGB32 | ColorFormatBSWAP |
 			    ColorFormatWSWAP,
 		.depth    = 32,
 		.flags    = FORMAT_FLAGS_PACKED,
 	}, {
-		.name     = "4:2:2, packed, YUYV",
 		.fourcc   = V4L2_PIX_FMT_YUYV,
 		.cxformat = ColorFormatYUY2,
 		.depth    = 16,
 		.flags    = FORMAT_FLAGS_PACKED,
 	}, {
-		.name     = "4:2:2, packed, UYVY",
 		.fourcc   = V4L2_PIX_FMT_UYVY,
 		.cxformat = ColorFormatYUY2 | ColorFormatBSWAP,
 		.depth    = 16,
@@ -489,9 +479,9 @@ static int buffer_prepare(struct vb2_buffer *vb)
 		break;
 	}
 	dprintk(2,
-		"[%p/%d] buffer_prepare - %dx%d %dbpp \"%s\" - dma=0x%08lx\n",
-		buf, buf->vb.vb2_buf.index,
-		core->width, core->height, dev->fmt->depth, dev->fmt->name,
+		"[%p/%d] %s - %dx%d %dbpp 0x%08x - dma=0x%08lx\n",
+		buf, buf->vb.vb2_buf.index, __func__,
+		core->width, core->height, dev->fmt->depth, dev->fmt->fourcc,
 		(unsigned long)buf->risc.dma);
 	return 0;
 }
@@ -829,7 +819,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void  *priv,
 	if (unlikely(f->index >= ARRAY_SIZE(formats)))
 		return -EINVAL;
 
-	strscpy(f->description, formats[f->index].name, sizeof(f->description));
 	f->pixelformat = formats[f->index].fourcc;
 
 	return 0;
diff --git a/drivers/media/pci/cx88/cx88.h b/drivers/media/pci/cx88/cx88.h
index a70a50dc3edf..744a22328ebc 100644
--- a/drivers/media/pci/cx88/cx88.h
+++ b/drivers/media/pci/cx88/cx88.h
@@ -99,7 +99,6 @@ static inline unsigned int norm_maxh(v4l2_std_id norm)
 /* static data                                                 */
 
 struct cx8800_fmt {
-	const char  *name;
 	u32   fourcc;          /* v4l2 format id */
 	int   depth;
 	int   flags;
diff --git a/drivers/media/pci/dt3155/dt3155.c b/drivers/media/pci/dt3155/dt3155.c
index b4cdda50e742..7480f0d3ad0f 100644
--- a/drivers/media/pci/dt3155/dt3155.c
+++ b/drivers/media/pci/dt3155/dt3155.c
@@ -306,7 +306,6 @@ static int dt3155_enum_fmt_vid_cap(struct file *filp,
 	if (f->index)
 		return -EINVAL;
 	f->pixelformat = V4L2_PIX_FMT_GREY;
-	strscpy(f->description, "8-bit Greyscale", sizeof(f->description));
 	return 0;
 }
 
diff --git a/drivers/media/pci/meye/meye.c b/drivers/media/pci/meye/meye.c
index 8218810c899e..0e61c81356ef 100644
--- a/drivers/media/pci/meye/meye.c
+++ b/drivers/media/pci/meye/meye.c
@@ -1104,12 +1104,9 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *fh,
 	if (f->index == 0) {
 		/* standard YUV 422 capture */
 		f->flags = 0;
-		strscpy(f->description, "YUV422", sizeof(f->description));
 		f->pixelformat = V4L2_PIX_FMT_YUYV;
 	} else {
 		/* compressed MJPEG capture */
-		f->flags = V4L2_FMT_FLAG_COMPRESSED;
-		strscpy(f->description, "MJPEG", sizeof(f->description));
 		f->pixelformat = V4L2_PIX_FMT_MJPEG;
 	}
 
diff --git a/drivers/media/pci/saa7134/saa7134-empress.c b/drivers/media/pci/saa7134/saa7134-empress.c
index 1a41a56afec6..cb65d345fd3e 100644
--- a/drivers/media/pci/saa7134/saa7134-empress.c
+++ b/drivers/media/pci/saa7134/saa7134-empress.c
@@ -91,9 +91,7 @@ static int empress_enum_fmt_vid_cap(struct file *file, void  *priv,
 	if (f->index != 0)
 		return -EINVAL;
 
-	strscpy(f->description, "MPEG TS", sizeof(f->description));
 	f->pixelformat = V4L2_PIX_FMT_MPEG;
-	f->flags = V4L2_FMT_FLAG_COMPRESSED;
 	return 0;
 }
 
diff --git a/drivers/media/pci/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c
index 606df51bb636..342cabf48064 100644
--- a/drivers/media/pci/saa7134/saa7134-video.c
+++ b/drivers/media/pci/saa7134/saa7134-video.c
@@ -90,70 +90,58 @@ static int video_out[][9] = {
 
 static struct saa7134_format formats[] = {
 	{
-		.name     = "8 bpp gray",
 		.fourcc   = V4L2_PIX_FMT_GREY,
 		.depth    = 8,
 		.pm       = 0x06,
 	},{
-		.name     = "15 bpp RGB, le",
 		.fourcc   = V4L2_PIX_FMT_RGB555,
 		.depth    = 16,
 		.pm       = 0x13 | 0x80,
 	},{
-		.name     = "15 bpp RGB, be",
 		.fourcc   = V4L2_PIX_FMT_RGB555X,
 		.depth    = 16,
 		.pm       = 0x13 | 0x80,
 		.bswap    = 1,
 	},{
-		.name     = "16 bpp RGB, le",
 		.fourcc   = V4L2_PIX_FMT_RGB565,
 		.depth    = 16,
 		.pm       = 0x10 | 0x80,
 	},{
-		.name     = "16 bpp RGB, be",
 		.fourcc   = V4L2_PIX_FMT_RGB565X,
 		.depth    = 16,
 		.pm       = 0x10 | 0x80,
 		.bswap    = 1,
 	},{
-		.name     = "24 bpp RGB, le",
 		.fourcc   = V4L2_PIX_FMT_BGR24,
 		.depth    = 24,
 		.pm       = 0x11,
 	},{
-		.name     = "24 bpp RGB, be",
 		.fourcc   = V4L2_PIX_FMT_RGB24,
 		.depth    = 24,
 		.pm       = 0x11,
 		.bswap    = 1,
 	},{
-		.name     = "32 bpp RGB, le",
 		.fourcc   = V4L2_PIX_FMT_BGR32,
 		.depth    = 32,
 		.pm       = 0x12,
 	},{
-		.name     = "32 bpp RGB, be",
 		.fourcc   = V4L2_PIX_FMT_RGB32,
 		.depth    = 32,
 		.pm       = 0x12,
 		.bswap    = 1,
 		.wswap    = 1,
 	},{
-		.name     = "4:2:2 packed, YUYV",
 		.fourcc   = V4L2_PIX_FMT_YUYV,
 		.depth    = 16,
 		.pm       = 0x00,
 		.bswap    = 1,
 		.yuv      = 1,
 	},{
-		.name     = "4:2:2 packed, UYVY",
 		.fourcc   = V4L2_PIX_FMT_UYVY,
 		.depth    = 16,
 		.pm       = 0x00,
 		.yuv      = 1,
 	},{
-		.name     = "4:2:2 planar, Y-Cb-Cr",
 		.fourcc   = V4L2_PIX_FMT_YUV422P,
 		.depth    = 16,
 		.pm       = 0x09,
@@ -162,7 +150,6 @@ static struct saa7134_format formats[] = {
 		.hshift   = 1,
 		.vshift   = 0,
 	},{
-		.name     = "4:2:0 planar, Y-Cb-Cr",
 		.fourcc   = V4L2_PIX_FMT_YUV420,
 		.depth    = 12,
 		.pm       = 0x0a,
@@ -171,7 +158,6 @@ static struct saa7134_format formats[] = {
 		.hshift   = 1,
 		.vshift   = 1,
 	},{
-		.name     = "4:2:0 planar, Y-Cb-Cr",
 		.fourcc   = V4L2_PIX_FMT_YVU420,
 		.depth    = 12,
 		.pm       = 0x0a,
@@ -720,10 +706,10 @@ static int start_preview(struct saa7134_dev *dev)
 		return err;
 
 	dev->ovfield = dev->win.field;
-	video_dbg("start_preview %dx%d+%d+%d %s field=%s\n",
-		dev->win.w.width, dev->win.w.height,
-		dev->win.w.left, dev->win.w.top,
-		dev->ovfmt->name, v4l2_field_names[dev->ovfield]);
+	video_dbg("%s %dx%d+%d+%d 0x%08x field=%s\n", __func__,
+		  dev->win.w.width, dev->win.w.height,
+		  dev->win.w.left, dev->win.w.top,
+		  dev->ovfmt->fourcc, v4l2_field_names[dev->ovfield]);
 
 	/* setup window + clipping */
 	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,
 	if (f->index >= FORMATS)
 		return -EINVAL;
 
-	strscpy(f->description, formats[f->index].name,
-		sizeof(f->description));
-
 	f->pixelformat = formats[f->index].fourcc;
 
 	return 0;
@@ -1799,9 +1782,6 @@ static int saa7134_enum_fmt_vid_overlay(struct file *file, void  *priv,
 	if ((f->index >= FORMATS) || formats[f->index].planar)
 		return -EINVAL;
 
-	strscpy(f->description, formats[f->index].name,
-		sizeof(f->description));
-
 	f->pixelformat = formats[f->index].fourcc;
 
 	return 0;
diff --git a/drivers/media/pci/saa7134/saa7134.h b/drivers/media/pci/saa7134/saa7134.h
index 6324f174c6f9..77c325e64a97 100644
--- a/drivers/media/pci/saa7134/saa7134.h
+++ b/drivers/media/pci/saa7134/saa7134.h
@@ -98,7 +98,6 @@ struct saa7134_tvaudio {
 };
 
 struct saa7134_format {
-	char           *name;
 	unsigned int   fourcc;
 	unsigned int   depth;
 	unsigned int   pm;
diff --git a/drivers/media/pci/saa7164/saa7164-encoder.c b/drivers/media/pci/saa7164/saa7164-encoder.c
index 43fdaa2d32bd..3fca7257a720 100644
--- a/drivers/media/pci/saa7164/saa7164-encoder.c
+++ b/drivers/media/pci/saa7164/saa7164-encoder.c
@@ -503,7 +503,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;
diff --git a/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c b/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c
index 609100a46ff8..a02f08459e14 100644
--- a/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c
+++ b/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c
@@ -822,25 +822,18 @@ static int solo_enc_enum_fmt_cap(struct file *file, void *priv,
 		switch (dev_type) {
 		case SOLO_DEV_6010:
 			f->pixelformat = V4L2_PIX_FMT_MPEG4;
-			strscpy(f->description, "MPEG-4 part 2",
-				sizeof(f->description));
 			break;
 		case SOLO_DEV_6110:
 			f->pixelformat = V4L2_PIX_FMT_H264;
-			strscpy(f->description, "H.264", sizeof(f->description));
 			break;
 		}
 		break;
 	case 1:
 		f->pixelformat = V4L2_PIX_FMT_MJPEG;
-		strscpy(f->description, "MJPEG", sizeof(f->description));
 		break;
 	default:
 		return -EINVAL;
 	}
-
-	f->flags = V4L2_FMT_FLAG_COMPRESSED;
-
 	return 0;
 }
 
diff --git a/drivers/media/pci/solo6x10/solo6x10-v4l2.c b/drivers/media/pci/solo6x10/solo6x10-v4l2.c
index a968f75920b5..2efa539d6075 100644
--- a/drivers/media/pci/solo6x10/solo6x10-v4l2.c
+++ b/drivers/media/pci/solo6x10/solo6x10-v4l2.c
@@ -458,8 +458,6 @@ static int solo_enum_fmt_cap(struct file *file, void *priv,
 		return -EINVAL;
 
 	f->pixelformat = V4L2_PIX_FMT_UYVY;
-	strscpy(f->description, "UYUV 4:2:2 Packed", sizeof(f->description));
-
 	return 0;
 }
 
diff --git a/drivers/media/pci/sta2x11/sta2x11_vip.c b/drivers/media/pci/sta2x11/sta2x11_vip.c
index e52e29814378..fd3de3bb0c89 100644
--- a/drivers/media/pci/sta2x11/sta2x11_vip.c
+++ b/drivers/media/pci/sta2x11/sta2x11_vip.c
@@ -560,9 +560,7 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
 	if (f->index != 0)
 		return -EINVAL;
 
-	strscpy(f->description, "4:2:2, packed, UYVY", sizeof(f->description));
 	f->pixelformat = V4L2_PIX_FMT_UYVY;
-	f->flags = 0;
 	return 0;
 }
 
diff --git a/drivers/media/pci/tw68/tw68-video.c b/drivers/media/pci/tw68/tw68-video.c
index 8e0952d65ad4..99e74c22d3be 100644
--- a/drivers/media/pci/tw68/tw68-video.c
+++ b/drivers/media/pci/tw68/tw68-video.c
@@ -34,53 +34,43 @@
  */
 static const struct tw68_format formats[] = {
 	{
-		.name		= "15 bpp RGB, le",
 		.fourcc		= V4L2_PIX_FMT_RGB555,
 		.depth		= 16,
 		.twformat	= ColorFormatRGB15,
 	}, {
-		.name		= "15 bpp RGB, be",
 		.fourcc		= V4L2_PIX_FMT_RGB555X,
 		.depth		= 16,
 		.twformat	= ColorFormatRGB15 | ColorFormatBSWAP,
 	}, {
-		.name		= "16 bpp RGB, le",
 		.fourcc		= V4L2_PIX_FMT_RGB565,
 		.depth		= 16,
 		.twformat	= ColorFormatRGB16,
 	}, {
-		.name		= "16 bpp RGB, be",
 		.fourcc		= V4L2_PIX_FMT_RGB565X,
 		.depth		= 16,
 		.twformat	= ColorFormatRGB16 | ColorFormatBSWAP,
 	}, {
-		.name		= "24 bpp RGB, le",
 		.fourcc		= V4L2_PIX_FMT_BGR24,
 		.depth		= 24,
 		.twformat	= ColorFormatRGB24,
 	}, {
-		.name		= "24 bpp RGB, be",
 		.fourcc		= V4L2_PIX_FMT_RGB24,
 		.depth		= 24,
 		.twformat	= ColorFormatRGB24 | ColorFormatBSWAP,
 	}, {
-		.name		= "32 bpp RGB, le",
 		.fourcc		= V4L2_PIX_FMT_BGR32,
 		.depth		= 32,
 		.twformat	= ColorFormatRGB32,
 	}, {
-		.name		= "32 bpp RGB, be",
 		.fourcc		= V4L2_PIX_FMT_RGB32,
 		.depth		= 32,
 		.twformat	= ColorFormatRGB32 | ColorFormatBSWAP |
 				  ColorFormatWSWAP,
 	}, {
-		.name		= "4:2:2 packed, YUYV",
 		.fourcc		= V4L2_PIX_FMT_YUYV,
 		.depth		= 16,
 		.twformat	= ColorFormatYUY2,
 	}, {
-		.name		= "4:2:2 packed, UYVY",
 		.fourcc		= V4L2_PIX_FMT_UYVY,
 		.depth		= 16,
 		.twformat	= ColorFormatYUY2 | ColorFormatBSWAP,
@@ -774,9 +764,6 @@ static int tw68_enum_fmt_vid_cap(struct file *file, void  *priv,
 	if (f->index >= FORMATS)
 		return -EINVAL;
 
-	strscpy(f->description, formats[f->index].name,
-		sizeof(f->description));
-
 	f->pixelformat = formats[f->index].fourcc;
 
 	return 0;
diff --git a/drivers/media/pci/tw68/tw68.h b/drivers/media/pci/tw68/tw68.h
index 7021290d726a..a1f422d6e600 100644
--- a/drivers/media/pci/tw68/tw68.h
+++ b/drivers/media/pci/tw68/tw68.h
@@ -85,7 +85,6 @@ struct tw68_tvnorm {
 };
 
 struct tw68_format {
-	char	*name;
 	u32	fourcc;
 	u32	depth;
 	u32	twformat;
diff --git a/include/media/drv-intf/saa7146_vv.h b/include/media/drv-intf/saa7146_vv.h
index b34d86bb0664..635805fb35e8 100644
--- a/include/media/drv-intf/saa7146_vv.h
+++ b/include/media/drv-intf/saa7146_vv.h
@@ -32,7 +32,6 @@ struct	saa7146_video_dma {
 #define FORMAT_IS_PLANAR	0x2
 
 struct saa7146_format {
-	char	*name;
 	u32	pixelformat;
 	u32	trans;
 	u8	depth;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 4/5] drivers/staging/media: don't set description for ENUM_FMT
  2019-06-26 11:27 [PATCH 0/5] media: let v4l2-ioctl set the format description Hans Verkuil
                   ` (2 preceding siblings ...)
  2019-06-26 11:27 ` [PATCH 3/5] media/pci: don't set description for ENUM_FMT Hans Verkuil
@ 2019-06-26 11:27 ` Hans Verkuil
  2019-06-26 16:55   ` Laurent Pinchart
  2019-06-26 11:27 ` [PATCH 5/5] media/platform: don't set description in ENUM_FMT Hans Verkuil
  4 siblings, 1 reply; 12+ messages in thread
From: Hans Verkuil @ 2019-06-26 11:27 UTC (permalink / raw)
  To: linux-media; +Cc: Hans Verkuil, Laurent Pinchart, Dave Stevenson, Eric Anholt

The V4L2 core sets the format description and flags 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.

Note that bcm2835-camera.c: the formats array still stores the flags
field for compressed formats since that information is used elsewhere
in the driver. But enum_fmt doesn't use it anymore, since the core
will set the COMPRESSED flag correctly.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Dave Stevenson <dave.stevenson@raspberrypi.org>
Cc: Eric Anholt <eric@anholt.net>
---
 drivers/staging/media/omap4iss/iss_video.c    | 40 +++++++++----------
 drivers/staging/media/omap4iss/iss_video.h    |  2 -
 drivers/staging/media/soc_camera/soc_camera.c |  2 -
 .../bcm2835-camera/bcm2835-camera.c           | 29 --------------
 .../bcm2835-camera/mmal-common.h              |  1 -
 include/media/drv-intf/soc_mediabus.h         |  2 -
 6 files changed, 19 insertions(+), 57 deletions(-)

diff --git a/drivers/staging/media/omap4iss/iss_video.c b/drivers/staging/media/omap4iss/iss_video.c
index c307707480f7..54144dc9f509 100644
--- a/drivers/staging/media/omap4iss/iss_video.c
+++ b/drivers/staging/media/omap4iss/iss_video.c
@@ -31,61 +31,61 @@
 static struct iss_format_info formats[] = {
 	{ MEDIA_BUS_FMT_Y8_1X8, MEDIA_BUS_FMT_Y8_1X8,
 	  MEDIA_BUS_FMT_Y8_1X8, MEDIA_BUS_FMT_Y8_1X8,
-	  V4L2_PIX_FMT_GREY, 8, "Greyscale 8 bpp", },
+	  V4L2_PIX_FMT_GREY, 8, },
 	{ MEDIA_BUS_FMT_Y10_1X10, MEDIA_BUS_FMT_Y10_1X10,
 	  MEDIA_BUS_FMT_Y10_1X10, MEDIA_BUS_FMT_Y8_1X8,
-	  V4L2_PIX_FMT_Y10, 10, "Greyscale 10 bpp", },
+	  V4L2_PIX_FMT_Y10, 10, },
 	{ MEDIA_BUS_FMT_Y12_1X12, MEDIA_BUS_FMT_Y10_1X10,
 	  MEDIA_BUS_FMT_Y12_1X12, MEDIA_BUS_FMT_Y8_1X8,
-	  V4L2_PIX_FMT_Y12, 12, "Greyscale 12 bpp", },
+	  V4L2_PIX_FMT_Y12, 12, },
 	{ MEDIA_BUS_FMT_SBGGR8_1X8, MEDIA_BUS_FMT_SBGGR8_1X8,
 	  MEDIA_BUS_FMT_SBGGR8_1X8, MEDIA_BUS_FMT_SBGGR8_1X8,
-	  V4L2_PIX_FMT_SBGGR8, 8, "BGGR Bayer 8 bpp", },
+	  V4L2_PIX_FMT_SBGGR8, 8, },
 	{ MEDIA_BUS_FMT_SGBRG8_1X8, MEDIA_BUS_FMT_SGBRG8_1X8,
 	  MEDIA_BUS_FMT_SGBRG8_1X8, MEDIA_BUS_FMT_SGBRG8_1X8,
-	  V4L2_PIX_FMT_SGBRG8, 8, "GBRG Bayer 8 bpp", },
+	  V4L2_PIX_FMT_SGBRG8, 8, },
 	{ MEDIA_BUS_FMT_SGRBG8_1X8, MEDIA_BUS_FMT_SGRBG8_1X8,
 	  MEDIA_BUS_FMT_SGRBG8_1X8, MEDIA_BUS_FMT_SGRBG8_1X8,
-	  V4L2_PIX_FMT_SGRBG8, 8, "GRBG Bayer 8 bpp", },
+	  V4L2_PIX_FMT_SGRBG8, 8, },
 	{ MEDIA_BUS_FMT_SRGGB8_1X8, MEDIA_BUS_FMT_SRGGB8_1X8,
 	  MEDIA_BUS_FMT_SRGGB8_1X8, MEDIA_BUS_FMT_SRGGB8_1X8,
-	  V4L2_PIX_FMT_SRGGB8, 8, "RGGB Bayer 8 bpp", },
+	  V4L2_PIX_FMT_SRGGB8, 8, },
 	{ MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8, MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8,
 	  MEDIA_BUS_FMT_SGRBG10_1X10, 0,
-	  V4L2_PIX_FMT_SGRBG10DPCM8, 8, "GRBG Bayer 10 bpp DPCM8",  },
+	  V4L2_PIX_FMT_SGRBG10DPCM8, 8, },
 	{ MEDIA_BUS_FMT_SBGGR10_1X10, MEDIA_BUS_FMT_SBGGR10_1X10,
 	  MEDIA_BUS_FMT_SBGGR10_1X10, MEDIA_BUS_FMT_SBGGR8_1X8,
-	  V4L2_PIX_FMT_SBGGR10, 10, "BGGR Bayer 10 bpp", },
+	  V4L2_PIX_FMT_SBGGR10, 10, },
 	{ MEDIA_BUS_FMT_SGBRG10_1X10, MEDIA_BUS_FMT_SGBRG10_1X10,
 	  MEDIA_BUS_FMT_SGBRG10_1X10, MEDIA_BUS_FMT_SGBRG8_1X8,
-	  V4L2_PIX_FMT_SGBRG10, 10, "GBRG Bayer 10 bpp", },
+	  V4L2_PIX_FMT_SGBRG10, 10, },
 	{ MEDIA_BUS_FMT_SGRBG10_1X10, MEDIA_BUS_FMT_SGRBG10_1X10,
 	  MEDIA_BUS_FMT_SGRBG10_1X10, MEDIA_BUS_FMT_SGRBG8_1X8,
-	  V4L2_PIX_FMT_SGRBG10, 10, "GRBG Bayer 10 bpp", },
+	  V4L2_PIX_FMT_SGRBG10, 10, },
 	{ MEDIA_BUS_FMT_SRGGB10_1X10, MEDIA_BUS_FMT_SRGGB10_1X10,
 	  MEDIA_BUS_FMT_SRGGB10_1X10, MEDIA_BUS_FMT_SRGGB8_1X8,
-	  V4L2_PIX_FMT_SRGGB10, 10, "RGGB Bayer 10 bpp", },
+	  V4L2_PIX_FMT_SRGGB10, 10, },
 	{ MEDIA_BUS_FMT_SBGGR12_1X12, MEDIA_BUS_FMT_SBGGR10_1X10,
 	  MEDIA_BUS_FMT_SBGGR12_1X12, MEDIA_BUS_FMT_SBGGR8_1X8,
-	  V4L2_PIX_FMT_SBGGR12, 12, "BGGR Bayer 12 bpp", },
+	  V4L2_PIX_FMT_SBGGR12, 12, },
 	{ MEDIA_BUS_FMT_SGBRG12_1X12, MEDIA_BUS_FMT_SGBRG10_1X10,
 	  MEDIA_BUS_FMT_SGBRG12_1X12, MEDIA_BUS_FMT_SGBRG8_1X8,
-	  V4L2_PIX_FMT_SGBRG12, 12, "GBRG Bayer 12 bpp", },
+	  V4L2_PIX_FMT_SGBRG12, 12, },
 	{ MEDIA_BUS_FMT_SGRBG12_1X12, MEDIA_BUS_FMT_SGRBG10_1X10,
 	  MEDIA_BUS_FMT_SGRBG12_1X12, MEDIA_BUS_FMT_SGRBG8_1X8,
-	  V4L2_PIX_FMT_SGRBG12, 12, "GRBG Bayer 12 bpp", },
+	  V4L2_PIX_FMT_SGRBG12, 12, },
 	{ MEDIA_BUS_FMT_SRGGB12_1X12, MEDIA_BUS_FMT_SRGGB10_1X10,
 	  MEDIA_BUS_FMT_SRGGB12_1X12, MEDIA_BUS_FMT_SRGGB8_1X8,
-	  V4L2_PIX_FMT_SRGGB12, 12, "RGGB Bayer 12 bpp", },
+	  V4L2_PIX_FMT_SRGGB12, 12, },
 	{ MEDIA_BUS_FMT_UYVY8_1X16, MEDIA_BUS_FMT_UYVY8_1X16,
 	  MEDIA_BUS_FMT_UYVY8_1X16, 0,
-	  V4L2_PIX_FMT_UYVY, 16, "YUV 4:2:2 (UYVY)", },
+	  V4L2_PIX_FMT_UYVY, 16, },
 	{ MEDIA_BUS_FMT_YUYV8_1X16, MEDIA_BUS_FMT_YUYV8_1X16,
 	  MEDIA_BUS_FMT_YUYV8_1X16, 0,
-	  V4L2_PIX_FMT_YUYV, 16, "YUV 4:2:2 (YUYV)", },
+	  V4L2_PIX_FMT_YUYV, 16, },
 	{ MEDIA_BUS_FMT_YUYV8_1_5X8, MEDIA_BUS_FMT_YUYV8_1_5X8,
 	  MEDIA_BUS_FMT_YUYV8_1_5X8, 0,
-	  V4L2_PIX_FMT_NV12, 8, "YUV 4:2:0 (NV12)", },
+	  V4L2_PIX_FMT_NV12, 8, },
 };
 
 const struct iss_format_info *
@@ -563,8 +563,6 @@ iss_video_enum_format(struct file *file, void *fh, struct v4l2_fmtdesc *f)
 
 		if (index == 0) {
 			f->pixelformat = info->pixelformat;
-			strscpy(f->description, info->description,
-				sizeof(f->description));
 			return 0;
 		}
 
diff --git a/drivers/staging/media/omap4iss/iss_video.h b/drivers/staging/media/omap4iss/iss_video.h
index f22489edb562..8b3dd92021e1 100644
--- a/drivers/staging/media/omap4iss/iss_video.h
+++ b/drivers/staging/media/omap4iss/iss_video.h
@@ -36,7 +36,6 @@ struct v4l2_pix_format;
  *	shifted to be 8 bits per pixel. =0 if format is not shiftable.
  * @pixelformat: V4L2 pixel format FCC identifier
  * @bpp: Bits per pixel
- * @description: Human-readable format description
  */
 struct iss_format_info {
 	u32 code;
@@ -45,7 +44,6 @@ struct iss_format_info {
 	u32 flavor;
 	u32 pixelformat;
 	unsigned int bpp;
-	const char *description;
 };
 
 enum iss_pipeline_stream_state {
diff --git a/drivers/staging/media/soc_camera/soc_camera.c b/drivers/staging/media/soc_camera/soc_camera.c
index a6232dcd59bc..7b9448e3c9ba 100644
--- a/drivers/staging/media/soc_camera/soc_camera.c
+++ b/drivers/staging/media/soc_camera/soc_camera.c
@@ -869,8 +869,6 @@ static int soc_camera_enum_fmt_vid_cap(struct file *file, void  *priv,
 
 	format = icd->user_formats[f->index].host_fmt;
 
-	if (format->name)
-		strscpy(f->description, format->name, sizeof(f->description));
 	f->pixelformat = format->fourcc;
 	return 0;
 }
diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
index 49d0470f9a7e..07254a843ef3 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
@@ -74,34 +74,27 @@ static const struct v4l2_fract
 /* video formats */
 static struct mmal_fmt formats[] = {
 	{
-		.name = "4:2:0, planar, YUV",
 		.fourcc = V4L2_PIX_FMT_YUV420,
-		.flags = 0,
 		.mmal = MMAL_ENCODING_I420,
 		.depth = 12,
 		.mmal_component = MMAL_COMPONENT_CAMERA,
 		.ybbp = 1,
 		.remove_padding = 1,
 	}, {
-		.name = "4:2:2, packed, YUYV",
 		.fourcc = V4L2_PIX_FMT_YUYV,
-		.flags = 0,
 		.mmal = MMAL_ENCODING_YUYV,
 		.depth = 16,
 		.mmal_component = MMAL_COMPONENT_CAMERA,
 		.ybbp = 2,
 		.remove_padding = 0,
 	}, {
-		.name = "RGB24 (LE)",
 		.fourcc = V4L2_PIX_FMT_RGB24,
-		.flags = 0,
 		.mmal = MMAL_ENCODING_RGB24,
 		.depth = 24,
 		.mmal_component = MMAL_COMPONENT_CAMERA,
 		.ybbp = 3,
 		.remove_padding = 0,
 	}, {
-		.name = "JPEG",
 		.fourcc = V4L2_PIX_FMT_JPEG,
 		.flags = V4L2_FMT_FLAG_COMPRESSED,
 		.mmal = MMAL_ENCODING_JPEG,
@@ -110,7 +103,6 @@ static struct mmal_fmt formats[] = {
 		.ybbp = 0,
 		.remove_padding = 0,
 	}, {
-		.name = "H264",
 		.fourcc = V4L2_PIX_FMT_H264,
 		.flags = V4L2_FMT_FLAG_COMPRESSED,
 		.mmal = MMAL_ENCODING_H264,
@@ -119,7 +111,6 @@ static struct mmal_fmt formats[] = {
 		.ybbp = 0,
 		.remove_padding = 0,
 	}, {
-		.name = "MJPEG",
 		.fourcc = V4L2_PIX_FMT_MJPEG,
 		.flags = V4L2_FMT_FLAG_COMPRESSED,
 		.mmal = MMAL_ENCODING_MJPEG,
@@ -128,72 +119,56 @@ static struct mmal_fmt formats[] = {
 		.ybbp = 0,
 		.remove_padding = 0,
 	}, {
-		.name = "4:2:2, packed, YVYU",
 		.fourcc = V4L2_PIX_FMT_YVYU,
-		.flags = 0,
 		.mmal = MMAL_ENCODING_YVYU,
 		.depth = 16,
 		.mmal_component = MMAL_COMPONENT_CAMERA,
 		.ybbp = 2,
 		.remove_padding = 0,
 	}, {
-		.name = "4:2:2, packed, VYUY",
 		.fourcc = V4L2_PIX_FMT_VYUY,
-		.flags = 0,
 		.mmal = MMAL_ENCODING_VYUY,
 		.depth = 16,
 		.mmal_component = MMAL_COMPONENT_CAMERA,
 		.ybbp = 2,
 		.remove_padding = 0,
 	}, {
-		.name = "4:2:2, packed, UYVY",
 		.fourcc = V4L2_PIX_FMT_UYVY,
-		.flags = 0,
 		.mmal = MMAL_ENCODING_UYVY,
 		.depth = 16,
 		.mmal_component = MMAL_COMPONENT_CAMERA,
 		.ybbp = 2,
 		.remove_padding = 0,
 	}, {
-		.name = "4:2:0, planar, NV12",
 		.fourcc = V4L2_PIX_FMT_NV12,
-		.flags = 0,
 		.mmal = MMAL_ENCODING_NV12,
 		.depth = 12,
 		.mmal_component = MMAL_COMPONENT_CAMERA,
 		.ybbp = 1,
 		.remove_padding = 1,
 	}, {
-		.name = "RGB24 (BE)",
 		.fourcc = V4L2_PIX_FMT_BGR24,
-		.flags = 0,
 		.mmal = MMAL_ENCODING_BGR24,
 		.depth = 24,
 		.mmal_component = MMAL_COMPONENT_CAMERA,
 		.ybbp = 3,
 		.remove_padding = 0,
 	}, {
-		.name = "4:2:0, planar, YVU",
 		.fourcc = V4L2_PIX_FMT_YVU420,
-		.flags = 0,
 		.mmal = MMAL_ENCODING_YV12,
 		.depth = 12,
 		.mmal_component = MMAL_COMPONENT_CAMERA,
 		.ybbp = 1,
 		.remove_padding = 1,
 	}, {
-		.name = "4:2:0, planar, NV21",
 		.fourcc = V4L2_PIX_FMT_NV21,
-		.flags = 0,
 		.mmal = MMAL_ENCODING_NV21,
 		.depth = 12,
 		.mmal_component = MMAL_COMPONENT_CAMERA,
 		.ybbp = 1,
 		.remove_padding = 1,
 	}, {
-		.name = "RGB32 (BE)",
 		.fourcc = V4L2_PIX_FMT_BGR32,
-		.flags = 0,
 		.mmal = MMAL_ENCODING_BGRA,
 		.depth = 32,
 		.mmal_component = MMAL_COMPONENT_CAMERA,
@@ -674,9 +649,7 @@ static int vidioc_enum_fmt_vid_overlay(struct file *file, void *priv,
 
 	fmt = &formats[f->index];
 
-	strlcpy((char *)f->description, fmt->name, sizeof(f->description));
 	f->pixelformat = fmt->fourcc;
-	f->flags = fmt->flags;
 
 	return 0;
 }
@@ -877,9 +850,7 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
 
 	fmt = &formats[f->index];
 
-	strlcpy((char *)f->description, fmt->name, sizeof(f->description));
 	f->pixelformat = fmt->fourcc;
-	f->flags = fmt->flags;
 
 	return 0;
 }
diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-common.h b/drivers/staging/vc04_services/bcm2835-camera/mmal-common.h
index a20bf274a4fd..df4ecbfdbe4a 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/mmal-common.h
+++ b/drivers/staging/vc04_services/bcm2835-camera/mmal-common.h
@@ -23,7 +23,6 @@ struct mmal_msg_context;
 
 /* mapping between v4l and mmal video modes */
 struct mmal_fmt {
-	char  *name;
 	u32   fourcc;          /* v4l2 format id */
 	int   flags;           /* v4l2 flags field */
 	u32   mmal;
diff --git a/include/media/drv-intf/soc_mediabus.h b/include/media/drv-intf/soc_mediabus.h
index 2ff773785fb6..28517ff9b4de 100644
--- a/include/media/drv-intf/soc_mediabus.h
+++ b/include/media/drv-intf/soc_mediabus.h
@@ -69,7 +69,6 @@ enum soc_mbus_layout {
 
 /**
  * struct soc_mbus_pixelfmt - Data format on the media bus
- * @name:		Name of the format
  * @fourcc:		Fourcc code, that will be obtained if the data is
  *			stored in memory in the following way:
  * @packing:		Type of sample-packing, that has to be used
@@ -77,7 +76,6 @@ enum soc_mbus_layout {
  * @bits_per_sample:	How many bits the bridge has to sample
  */
 struct soc_mbus_pixelfmt {
-	const char		*name;
 	u32			fourcc;
 	enum soc_mbus_packing	packing;
 	enum soc_mbus_order	order;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 5/5] media/platform: don't set description in ENUM_FMT
  2019-06-26 11:27 [PATCH 0/5] media: let v4l2-ioctl set the format description Hans Verkuil
                   ` (3 preceding siblings ...)
  2019-06-26 11:27 ` [PATCH 4/5] drivers/staging/media: " Hans Verkuil
@ 2019-06-26 11:27 ` Hans Verkuil
  2019-06-26 14:36   ` Benoit Parrot
                     ` (2 more replies)
  4 siblings, 3 replies; 12+ messages in thread
From: Hans Verkuil @ 2019-06-26 11:27 UTC (permalink / raw)
  To: linux-media
  Cc: Hans Verkuil, Laurent Pinchart, Prabhakar Lad,
	Sylwester Nawrocki, Jonathan Corbet, Jacopo Mondi, Benoit Parrot

The V4L2 core sets the format description and flags 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>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Prabhakar Lad <prabhakar.csengg@gmail.com>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Jacopo Mondi <jacopo@jmondi.org>
Cc: Benoit Parrot <bparrot@ti.com>
---
 drivers/media/platform/am437x/am437x-vpfe.c   | 18 ++-----------
 drivers/media/platform/davinci/vpbe_display.c | 14 ++--------
 drivers/media/platform/davinci/vpif_capture.c | 11 ++------
 drivers/media/platform/davinci/vpif_display.c |  4 ---
 drivers/media/platform/exynos-gsc/gsc-core.c  | 22 ---------------
 drivers/media/platform/exynos-gsc/gsc-core.h  |  2 --
 .../media/platform/exynos4-is/fimc-capture.c  |  3 ---
 drivers/media/platform/exynos4-is/fimc-core.c | 20 --------------
 .../platform/exynos4-is/fimc-isp-video.c      |  1 -
 drivers/media/platform/exynos4-is/fimc-isp.c  |  3 ---
 drivers/media/platform/exynos4-is/fimc-lite.c |  8 ------
 drivers/media/platform/exynos4-is/fimc-m2m.c  |  1 -
 drivers/media/platform/m2m-deinterlace.c      |  4 ---
 .../media/platform/marvell-ccic/mcam-core.c   | 10 -------
 drivers/media/platform/mx2_emmaprp.c          |  4 ---
 drivers/media/platform/omap/omap_vout.c       |  7 -----
 .../media/platform/s3c-camif/camif-capture.c  | 11 +++-----
 drivers/media/platform/s3c-camif/camif-core.c |  6 -----
 drivers/media/platform/s3c-camif/camif-core.h |  1 -
 drivers/media/platform/s5p-g2d/g2d.c          |  6 -----
 drivers/media/platform/s5p-g2d/g2d.h          |  1 -
 drivers/media/platform/s5p-jpeg/jpeg-core.c   | 27 -------------------
 drivers/media/platform/s5p-jpeg/jpeg-core.h   |  2 --
 .../media/platform/s5p-mfc/s5p_mfc_common.h   |  1 -
 drivers/media/platform/s5p-mfc/s5p_mfc_dec.c  | 15 -----------
 drivers/media/platform/s5p-mfc/s5p_mfc_enc.c  | 10 -------
 drivers/media/platform/sh_veu.c               | 19 ++++++-------
 drivers/media/platform/sh_vou.c               | 12 ++-------
 drivers/media/platform/ti-vpe/vpe.c           | 12 ---------
 drivers/media/platform/via-camera.c           |  4 ---
 drivers/media/platform/xilinx/xilinx-dma.c    |  2 --
 drivers/media/platform/xilinx/xilinx-vip.c    | 16 +++++------
 drivers/media/platform/xilinx/xilinx-vip.h    |  2 --
 include/media/drv-intf/exynos-fimc.h          |  2 --
 34 files changed, 28 insertions(+), 253 deletions(-)

diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c
index fe7b937eb5f2..7582c26f8459 100644
--- a/drivers/media/platform/am437x/am437x-vpfe.c
+++ b/drivers/media/platform/am437x/am437x-vpfe.c
@@ -76,7 +76,6 @@ struct bus_format {
 
 /*
  * struct vpfe_fmt - VPFE media bus format information
- * @name: V4L2 format description
  * @code: V4L2 media bus format code
  * @shifted: V4L2 media bus format code for the same pixel layout but
  *	shifted to be 8 bits per pixel. =0 if format is not shiftable.
@@ -86,7 +85,6 @@ struct bus_format {
  * @supported: Indicates format supported by subdev
  */
 struct vpfe_fmt {
-	const char *name;
 	u32 fourcc;
 	u32 code;
 	struct bus_format l;
@@ -97,7 +95,6 @@ struct vpfe_fmt {
 
 static struct vpfe_fmt formats[] = {
 	{
-		.name		= "YUV 4:2:2 packed, YCbYCr",
 		.fourcc		= V4L2_PIX_FMT_YUYV,
 		.code		= MEDIA_BUS_FMT_YUYV8_2X8,
 		.l.width	= 10,
@@ -106,7 +103,6 @@ static struct vpfe_fmt formats[] = {
 		.s.bpp		= 2,
 		.supported	= false,
 	}, {
-		.name		= "YUV 4:2:2 packed, CbYCrY",
 		.fourcc		= V4L2_PIX_FMT_UYVY,
 		.code		= MEDIA_BUS_FMT_UYVY8_2X8,
 		.l.width	= 10,
@@ -115,7 +111,6 @@ static struct vpfe_fmt formats[] = {
 		.s.bpp		= 2,
 		.supported	= false,
 	}, {
-		.name		= "YUV 4:2:2 packed, YCrYCb",
 		.fourcc		= V4L2_PIX_FMT_YVYU,
 		.code		= MEDIA_BUS_FMT_YVYU8_2X8,
 		.l.width	= 10,
@@ -124,7 +119,6 @@ static struct vpfe_fmt formats[] = {
 		.s.bpp		= 2,
 		.supported	= false,
 	}, {
-		.name		= "YUV 4:2:2 packed, CrYCbY",
 		.fourcc		= V4L2_PIX_FMT_VYUY,
 		.code		= MEDIA_BUS_FMT_VYUY8_2X8,
 		.l.width	= 10,
@@ -133,7 +127,6 @@ static struct vpfe_fmt formats[] = {
 		.s.bpp		= 2,
 		.supported	= false,
 	}, {
-		.name		= "RAW8 BGGR",
 		.fourcc		= V4L2_PIX_FMT_SBGGR8,
 		.code		= MEDIA_BUS_FMT_SBGGR8_1X8,
 		.l.width	= 10,
@@ -142,7 +135,6 @@ static struct vpfe_fmt formats[] = {
 		.s.bpp		= 1,
 		.supported	= false,
 	}, {
-		.name		= "RAW8 GBRG",
 		.fourcc		= V4L2_PIX_FMT_SGBRG8,
 		.code		= MEDIA_BUS_FMT_SGBRG8_1X8,
 		.l.width	= 10,
@@ -151,7 +143,6 @@ static struct vpfe_fmt formats[] = {
 		.s.bpp		= 1,
 		.supported	= false,
 	}, {
-		.name		= "RAW8 GRBG",
 		.fourcc		= V4L2_PIX_FMT_SGRBG8,
 		.code		= MEDIA_BUS_FMT_SGRBG8_1X8,
 		.l.width	= 10,
@@ -160,7 +151,6 @@ static struct vpfe_fmt formats[] = {
 		.s.bpp		= 1,
 		.supported	= false,
 	}, {
-		.name		= "RAW8 RGGB",
 		.fourcc		= V4L2_PIX_FMT_SRGGB8,
 		.code		= MEDIA_BUS_FMT_SRGGB8_1X8,
 		.l.width	= 10,
@@ -169,7 +159,6 @@ static struct vpfe_fmt formats[] = {
 		.s.bpp		= 1,
 		.supported	= false,
 	}, {
-		.name		= "RGB565 (LE)",
 		.fourcc		= V4L2_PIX_FMT_RGB565,
 		.code		= MEDIA_BUS_FMT_RGB565_2X8_LE,
 		.l.width	= 10,
@@ -178,7 +167,6 @@ static struct vpfe_fmt formats[] = {
 		.s.bpp		= 2,
 		.supported	= false,
 	}, {
-		.name		= "RGB565 (BE)",
 		.fourcc		= V4L2_PIX_FMT_RGB565X,
 		.code		= MEDIA_BUS_FMT_RGB565_2X8_BE,
 		.l.width	= 10,
@@ -1540,12 +1528,10 @@ static int vpfe_enum_fmt(struct file *file, void  *priv,
 	if (!fmt)
 		return -EINVAL;
 
-	strscpy(f->description, fmt->name, sizeof(f->description));
 	f->pixelformat = fmt->fourcc;
-	f->type = vpfe->fmt.type;
 
-	vpfe_dbg(1, vpfe, "vpfe_enum_format: mbus index: %d code: %x pixelformat: %s [%s]\n",
-		f->index, fmt->code, print_fourcc(fmt->fourcc), fmt->name);
+	vpfe_dbg(1, vpfe, "vpfe_enum_format: mbus index: %d code: %x pixelformat: %s\n",
+		 f->index, fmt->code, print_fourcc(fmt->fourcc));
 
 	return 0;
 }
diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c
index 000b191c42d8..ed10a9bbf96b 100644
--- a/drivers/media/platform/davinci/vpbe_display.c
+++ b/drivers/media/platform/davinci/vpbe_display.c
@@ -792,7 +792,6 @@ static int vpbe_display_enum_fmt(struct file *file, void  *priv,
 {
 	struct vpbe_layer *layer = video_drvdata(file);
 	struct vpbe_device *vpbe_dev = layer->disp_dev->vpbe_dev;
-	unsigned int index = 0;
 
 	v4l2_dbg(1, debug, &vpbe_dev->v4l2_dev,
 				"VIDIOC_ENUM_FMT, layer id = %d\n",
@@ -803,19 +802,10 @@ static int vpbe_display_enum_fmt(struct file *file, void  *priv,
 	}
 
 	/* Fill in the information about format */
-	index = fmt->index;
-	memset(fmt, 0, sizeof(*fmt));
-	fmt->index = index;
-	fmt->type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
-	if (index == 0) {
-		strscpy(fmt->description, "YUV 4:2:2 - UYVY",
-			sizeof(fmt->description));
+	if (fmt->index == 0)
 		fmt->pixelformat = V4L2_PIX_FMT_UYVY;
-	} else {
-		strscpy(fmt->description, "Y/CbCr 4:2:0",
-			sizeof(fmt->description));
+	else
 		fmt->pixelformat = V4L2_PIX_FMT_NV12;
-	}
 
 	return 0;
 }
diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c
index f0f7ef638c56..621d28470d2b 100644
--- a/drivers/media/platform/davinci/vpif_capture.c
+++ b/drivers/media/platform/davinci/vpif_capture.c
@@ -938,17 +938,10 @@ static int vpif_enum_fmt_vid_cap(struct file *file, void  *priv,
 	}
 
 	/* Fill in the information about format */
-	if (ch->vpifparams.iface.if_type == VPIF_IF_RAW_BAYER) {
-		fmt->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-		strscpy(fmt->description, "Raw Mode -Bayer Pattern GrRBGb",
-			sizeof(fmt->description));
+	if (ch->vpifparams.iface.if_type == VPIF_IF_RAW_BAYER)
 		fmt->pixelformat = V4L2_PIX_FMT_SBGGR8;
-	} else {
-		fmt->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-		strscpy(fmt->description, "YCbCr4:2:2 Semi-Planar",
-			sizeof(fmt->description));
+	else
 		fmt->pixelformat = V4L2_PIX_FMT_NV16;
-	}
 	return 0;
 }
 
diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c
index a69897c68a50..be32f87001cd 100644
--- a/drivers/media/platform/davinci/vpif_display.c
+++ b/drivers/media/platform/davinci/vpif_display.c
@@ -601,11 +601,7 @@ static int vpif_enum_fmt_vid_out(struct file *file, void  *priv,
 		return -EINVAL;
 
 	/* Fill in the information about format */
-	fmt->type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
-	strscpy(fmt->description, "YCbCr4:2:2 YC Planar",
-		sizeof(fmt->description));
 	fmt->pixelformat = V4L2_PIX_FMT_YUV422P;
-	fmt->flags = 0;
 	return 0;
 }
 
diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c
index 854869f0024e..f6650b45bc3d 100644
--- a/drivers/media/platform/exynos-gsc/gsc-core.c
+++ b/drivers/media/platform/exynos-gsc/gsc-core.c
@@ -27,21 +27,18 @@
 
 static const struct gsc_fmt gsc_formats[] = {
 	{
-		.name		= "RGB565",
 		.pixelformat	= V4L2_PIX_FMT_RGB565X,
 		.depth		= { 16 },
 		.color		= GSC_RGB,
 		.num_planes	= 1,
 		.num_comp	= 1,
 	}, {
-		.name		= "BGRX-8-8-8-8, 32 bpp",
 		.pixelformat	= V4L2_PIX_FMT_BGR32,
 		.depth		= { 32 },
 		.color		= GSC_RGB,
 		.num_planes	= 1,
 		.num_comp	= 1,
 	}, {
-		.name		= "YUV 4:2:2 packed, YCbYCr",
 		.pixelformat	= V4L2_PIX_FMT_YUYV,
 		.depth		= { 16 },
 		.color		= GSC_YUV422,
@@ -51,7 +48,6 @@ static const struct gsc_fmt gsc_formats[] = {
 		.num_comp	= 1,
 		.mbus_code	= MEDIA_BUS_FMT_YUYV8_2X8,
 	}, {
-		.name		= "YUV 4:2:2 packed, CbYCrY",
 		.pixelformat	= V4L2_PIX_FMT_UYVY,
 		.depth		= { 16 },
 		.color		= GSC_YUV422,
@@ -61,7 +57,6 @@ static const struct gsc_fmt gsc_formats[] = {
 		.num_comp	= 1,
 		.mbus_code	= MEDIA_BUS_FMT_UYVY8_2X8,
 	}, {
-		.name		= "YUV 4:2:2 packed, CrYCbY",
 		.pixelformat	= V4L2_PIX_FMT_VYUY,
 		.depth		= { 16 },
 		.color		= GSC_YUV422,
@@ -71,7 +66,6 @@ static const struct gsc_fmt gsc_formats[] = {
 		.num_comp	= 1,
 		.mbus_code	= MEDIA_BUS_FMT_VYUY8_2X8,
 	}, {
-		.name		= "YUV 4:2:2 packed, YCrYCb",
 		.pixelformat	= V4L2_PIX_FMT_YVYU,
 		.depth		= { 16 },
 		.color		= GSC_YUV422,
@@ -81,7 +75,6 @@ static const struct gsc_fmt gsc_formats[] = {
 		.num_comp	= 1,
 		.mbus_code	= MEDIA_BUS_FMT_YVYU8_2X8,
 	}, {
-		.name		= "YUV 4:4:4 planar, YCbYCr",
 		.pixelformat	= V4L2_PIX_FMT_YUV32,
 		.depth		= { 32 },
 		.color		= GSC_YUV444,
@@ -90,7 +83,6 @@ static const struct gsc_fmt gsc_formats[] = {
 		.num_planes	= 1,
 		.num_comp	= 1,
 	}, {
-		.name		= "YUV 4:2:2 planar, Y/Cb/Cr",
 		.pixelformat	= V4L2_PIX_FMT_YUV422P,
 		.depth		= { 16 },
 		.color		= GSC_YUV422,
@@ -99,7 +91,6 @@ static const struct gsc_fmt gsc_formats[] = {
 		.num_planes	= 1,
 		.num_comp	= 3,
 	}, {
-		.name		= "YUV 4:2:2 planar, Y/CbCr",
 		.pixelformat	= V4L2_PIX_FMT_NV16,
 		.depth		= { 16 },
 		.color		= GSC_YUV422,
@@ -108,7 +99,6 @@ static const struct gsc_fmt gsc_formats[] = {
 		.num_planes	= 1,
 		.num_comp	= 2,
 	}, {
-		.name		= "YUV 4:2:2 non-contig, Y/CbCr",
 		.pixelformat	= V4L2_PIX_FMT_NV16M,
 		.depth		= { 8, 8 },
 		.color		= GSC_YUV422,
@@ -117,7 +107,6 @@ static const struct gsc_fmt gsc_formats[] = {
 		.num_planes	= 2,
 		.num_comp	= 2,
 	}, {
-		.name		= "YUV 4:2:2 planar, Y/CrCb",
 		.pixelformat	= V4L2_PIX_FMT_NV61,
 		.depth		= { 16 },
 		.color		= GSC_YUV422,
@@ -126,7 +115,6 @@ static const struct gsc_fmt gsc_formats[] = {
 		.num_planes	= 1,
 		.num_comp	= 2,
 	}, {
-		.name		= "YUV 4:2:2 non-contig, Y/CrCb",
 		.pixelformat	= V4L2_PIX_FMT_NV61M,
 		.depth		= { 8, 8 },
 		.color		= GSC_YUV422,
@@ -135,7 +123,6 @@ static const struct gsc_fmt gsc_formats[] = {
 		.num_planes	= 2,
 		.num_comp	= 2,
 	}, {
-		.name		= "YUV 4:2:0 planar, YCbCr",
 		.pixelformat	= V4L2_PIX_FMT_YUV420,
 		.depth		= { 12 },
 		.color		= GSC_YUV420,
@@ -144,7 +131,6 @@ static const struct gsc_fmt gsc_formats[] = {
 		.num_planes	= 1,
 		.num_comp	= 3,
 	}, {
-		.name		= "YUV 4:2:0 planar, YCrCb",
 		.pixelformat	= V4L2_PIX_FMT_YVU420,
 		.depth		= { 12 },
 		.color		= GSC_YUV420,
@@ -154,7 +140,6 @@ static const struct gsc_fmt gsc_formats[] = {
 		.num_comp	= 3,
 
 	}, {
-		.name		= "YUV 4:2:0 planar, Y/CbCr",
 		.pixelformat	= V4L2_PIX_FMT_NV12,
 		.depth		= { 12 },
 		.color		= GSC_YUV420,
@@ -163,7 +148,6 @@ static const struct gsc_fmt gsc_formats[] = {
 		.num_planes	= 1,
 		.num_comp	= 2,
 	}, {
-		.name		= "YUV 4:2:0 planar, Y/CrCb",
 		.pixelformat	= V4L2_PIX_FMT_NV21,
 		.depth		= { 12 },
 		.color		= GSC_YUV420,
@@ -172,7 +156,6 @@ static const struct gsc_fmt gsc_formats[] = {
 		.num_planes	= 1,
 		.num_comp	= 2,
 	}, {
-		.name		= "YUV 4:2:0 non-contig. 2p, Y/CrCb",
 		.pixelformat	= V4L2_PIX_FMT_NV21M,
 		.depth		= { 8, 4 },
 		.color		= GSC_YUV420,
@@ -181,7 +164,6 @@ static const struct gsc_fmt gsc_formats[] = {
 		.num_planes	= 2,
 		.num_comp	= 2,
 	}, {
-		.name		= "YUV 4:2:0 non-contig. 2p, Y/CbCr",
 		.pixelformat	= V4L2_PIX_FMT_NV12M,
 		.depth		= { 8, 4 },
 		.color		= GSC_YUV420,
@@ -190,7 +172,6 @@ static const struct gsc_fmt gsc_formats[] = {
 		.num_planes	= 2,
 		.num_comp	= 2,
 	}, {
-		.name		= "YUV 4:2:0 non-contig. 3p, Y/Cb/Cr",
 		.pixelformat	= V4L2_PIX_FMT_YUV420M,
 		.depth		= { 8, 2, 2 },
 		.color		= GSC_YUV420,
@@ -199,7 +180,6 @@ static const struct gsc_fmt gsc_formats[] = {
 		.num_planes	= 3,
 		.num_comp	= 3,
 	}, {
-		.name		= "YUV 4:2:0 non-contig. 3p, Y/Cr/Cb",
 		.pixelformat	= V4L2_PIX_FMT_YVU420M,
 		.depth		= { 8, 2, 2 },
 		.color		= GSC_YUV420,
@@ -208,7 +188,6 @@ static const struct gsc_fmt gsc_formats[] = {
 		.num_planes	= 3,
 		.num_comp	= 3,
 	}, {
-		.name		= "YUV 4:2:0 n.c. 2p, Y/CbCr tiled",
 		.pixelformat	= V4L2_PIX_FMT_NV12MT_16X16,
 		.depth		= { 8, 4 },
 		.color		= GSC_YUV420,
@@ -335,7 +314,6 @@ int gsc_enum_fmt(struct v4l2_fmtdesc *f)
 	if (!fmt)
 		return -EINVAL;
 
-	strscpy(f->description, fmt->name, sizeof(f->description));
 	f->pixelformat = fmt->pixelformat;
 
 	return 0;
diff --git a/drivers/media/platform/exynos-gsc/gsc-core.h b/drivers/media/platform/exynos-gsc/gsc-core.h
index 8ea49ca004fd..0e114f114c24 100644
--- a/drivers/media/platform/exynos-gsc/gsc-core.h
+++ b/drivers/media/platform/exynos-gsc/gsc-core.h
@@ -105,7 +105,6 @@ enum gsc_yuv_fmt {
 /**
  * struct gsc_fmt - the driver's internal color format data
  * @mbus_code: Media Bus pixel code, -1 if not applicable
- * @name: format description
  * @pixelformat: the fourcc code for this format, 0 if not applicable
  * @yorder: Y/C order
  * @corder: Chrominance order control
@@ -116,7 +115,6 @@ enum gsc_yuv_fmt {
  */
 struct gsc_fmt {
 	u32 mbus_code;
-	char	*name;
 	u32	pixelformat;
 	u32	color;
 	u32	yorder;
diff --git a/drivers/media/platform/exynos4-is/fimc-capture.c b/drivers/media/platform/exynos4-is/fimc-capture.c
index 84b91e248c5a..ab91e8e0b41c 100644
--- a/drivers/media/platform/exynos4-is/fimc-capture.c
+++ b/drivers/media/platform/exynos4-is/fimc-capture.c
@@ -741,10 +741,7 @@ static int fimc_cap_enum_fmt(struct file *file, void *priv,
 			       f->index);
 	if (!fmt)
 		return -EINVAL;
-	strscpy(f->description, fmt->name, sizeof(f->description));
 	f->pixelformat = fmt->fourcc;
-	if (fmt->fourcc == MEDIA_BUS_FMT_JPEG_1X8)
-		f->flags |= V4L2_FMT_FLAG_COMPRESSED;
 	return 0;
 }
 
diff --git a/drivers/media/platform/exynos4-is/fimc-core.c b/drivers/media/platform/exynos4-is/fimc-core.c
index 7006f54bfee2..cde60fbb23a8 100644
--- a/drivers/media/platform/exynos4-is/fimc-core.c
+++ b/drivers/media/platform/exynos4-is/fimc-core.c
@@ -36,7 +36,6 @@ static char *fimc_clocks[MAX_FIMC_CLOCKS] = {
 
 static struct fimc_fmt fimc_formats[] = {
 	{
-		.name		= "RGB565",
 		.fourcc		= V4L2_PIX_FMT_RGB565,
 		.depth		= { 16 },
 		.color		= FIMC_FMT_RGB565,
@@ -44,7 +43,6 @@ static struct fimc_fmt fimc_formats[] = {
 		.colplanes	= 1,
 		.flags		= FMT_FLAGS_M2M,
 	}, {
-		.name		= "BGR666",
 		.fourcc		= V4L2_PIX_FMT_BGR666,
 		.depth		= { 32 },
 		.color		= FIMC_FMT_RGB666,
@@ -52,7 +50,6 @@ static struct fimc_fmt fimc_formats[] = {
 		.colplanes	= 1,
 		.flags		= FMT_FLAGS_M2M,
 	}, {
-		.name		= "BGRA8888, 32 bpp",
 		.fourcc		= V4L2_PIX_FMT_BGR32,
 		.depth		= { 32 },
 		.color		= FIMC_FMT_RGB888,
@@ -60,7 +57,6 @@ static struct fimc_fmt fimc_formats[] = {
 		.colplanes	= 1,
 		.flags		= FMT_FLAGS_M2M | FMT_HAS_ALPHA,
 	}, {
-		.name		= "ARGB1555",
 		.fourcc		= V4L2_PIX_FMT_RGB555,
 		.depth		= { 16 },
 		.color		= FIMC_FMT_RGB555,
@@ -68,7 +64,6 @@ static struct fimc_fmt fimc_formats[] = {
 		.colplanes	= 1,
 		.flags		= FMT_FLAGS_M2M_OUT | FMT_HAS_ALPHA,
 	}, {
-		.name		= "ARGB4444",
 		.fourcc		= V4L2_PIX_FMT_RGB444,
 		.depth		= { 16 },
 		.color		= FIMC_FMT_RGB444,
@@ -76,11 +71,9 @@ static struct fimc_fmt fimc_formats[] = {
 		.colplanes	= 1,
 		.flags		= FMT_FLAGS_M2M_OUT | FMT_HAS_ALPHA,
 	}, {
-		.name		= "YUV 4:4:4",
 		.mbus_code	= MEDIA_BUS_FMT_YUV10_1X30,
 		.flags		= FMT_FLAGS_WRITEBACK,
 	}, {
-		.name		= "YUV 4:2:2 packed, YCbYCr",
 		.fourcc		= V4L2_PIX_FMT_YUYV,
 		.depth		= { 16 },
 		.color		= FIMC_FMT_YCBYCR422,
@@ -89,7 +82,6 @@ static struct fimc_fmt fimc_formats[] = {
 		.mbus_code	= MEDIA_BUS_FMT_YUYV8_2X8,
 		.flags		= FMT_FLAGS_M2M | FMT_FLAGS_CAM,
 	}, {
-		.name		= "YUV 4:2:2 packed, CbYCrY",
 		.fourcc		= V4L2_PIX_FMT_UYVY,
 		.depth		= { 16 },
 		.color		= FIMC_FMT_CBYCRY422,
@@ -98,7 +90,6 @@ static struct fimc_fmt fimc_formats[] = {
 		.mbus_code	= MEDIA_BUS_FMT_UYVY8_2X8,
 		.flags		= FMT_FLAGS_M2M | FMT_FLAGS_CAM,
 	}, {
-		.name		= "YUV 4:2:2 packed, CrYCbY",
 		.fourcc		= V4L2_PIX_FMT_VYUY,
 		.depth		= { 16 },
 		.color		= FIMC_FMT_CRYCBY422,
@@ -107,7 +98,6 @@ static struct fimc_fmt fimc_formats[] = {
 		.mbus_code	= MEDIA_BUS_FMT_VYUY8_2X8,
 		.flags		= FMT_FLAGS_M2M | FMT_FLAGS_CAM,
 	}, {
-		.name		= "YUV 4:2:2 packed, YCrYCb",
 		.fourcc		= V4L2_PIX_FMT_YVYU,
 		.depth		= { 16 },
 		.color		= FIMC_FMT_YCRYCB422,
@@ -116,7 +106,6 @@ static struct fimc_fmt fimc_formats[] = {
 		.mbus_code	= MEDIA_BUS_FMT_YVYU8_2X8,
 		.flags		= FMT_FLAGS_M2M | FMT_FLAGS_CAM,
 	}, {
-		.name		= "YUV 4:2:2 planar, Y/Cb/Cr",
 		.fourcc		= V4L2_PIX_FMT_YUV422P,
 		.depth		= { 16 },
 		.color		= FIMC_FMT_YCBYCR422,
@@ -124,7 +113,6 @@ static struct fimc_fmt fimc_formats[] = {
 		.colplanes	= 3,
 		.flags		= FMT_FLAGS_M2M,
 	}, {
-		.name		= "YUV 4:2:2 planar, Y/CbCr",
 		.fourcc		= V4L2_PIX_FMT_NV16,
 		.depth		= { 16 },
 		.color		= FIMC_FMT_YCBYCR422,
@@ -132,7 +120,6 @@ static struct fimc_fmt fimc_formats[] = {
 		.colplanes	= 2,
 		.flags		= FMT_FLAGS_M2M,
 	}, {
-		.name		= "YUV 4:2:2 planar, Y/CrCb",
 		.fourcc		= V4L2_PIX_FMT_NV61,
 		.depth		= { 16 },
 		.color		= FIMC_FMT_YCRYCB422,
@@ -140,7 +127,6 @@ static struct fimc_fmt fimc_formats[] = {
 		.colplanes	= 2,
 		.flags		= FMT_FLAGS_M2M,
 	}, {
-		.name		= "YUV 4:2:0 planar, YCbCr",
 		.fourcc		= V4L2_PIX_FMT_YUV420,
 		.depth		= { 12 },
 		.color		= FIMC_FMT_YCBCR420,
@@ -148,7 +134,6 @@ static struct fimc_fmt fimc_formats[] = {
 		.colplanes	= 3,
 		.flags		= FMT_FLAGS_M2M,
 	}, {
-		.name		= "YUV 4:2:0 planar, Y/CbCr",
 		.fourcc		= V4L2_PIX_FMT_NV12,
 		.depth		= { 12 },
 		.color		= FIMC_FMT_YCBCR420,
@@ -156,7 +141,6 @@ static struct fimc_fmt fimc_formats[] = {
 		.colplanes	= 2,
 		.flags		= FMT_FLAGS_M2M,
 	}, {
-		.name		= "YUV 4:2:0 non-contig. 2p, Y/CbCr",
 		.fourcc		= V4L2_PIX_FMT_NV12M,
 		.color		= FIMC_FMT_YCBCR420,
 		.depth		= { 8, 4 },
@@ -164,7 +148,6 @@ static struct fimc_fmt fimc_formats[] = {
 		.colplanes	= 2,
 		.flags		= FMT_FLAGS_M2M,
 	}, {
-		.name		= "YUV 4:2:0 non-contig. 3p, Y/Cb/Cr",
 		.fourcc		= V4L2_PIX_FMT_YUV420M,
 		.color		= FIMC_FMT_YCBCR420,
 		.depth		= { 8, 2, 2 },
@@ -172,7 +155,6 @@ static struct fimc_fmt fimc_formats[] = {
 		.colplanes	= 3,
 		.flags		= FMT_FLAGS_M2M,
 	}, {
-		.name		= "YUV 4:2:0 non-contig. 2p, tiled",
 		.fourcc		= V4L2_PIX_FMT_NV12MT,
 		.color		= FIMC_FMT_YCBCR420,
 		.depth		= { 8, 4 },
@@ -180,7 +162,6 @@ static struct fimc_fmt fimc_formats[] = {
 		.colplanes	= 2,
 		.flags		= FMT_FLAGS_M2M,
 	}, {
-		.name		= "JPEG encoded data",
 		.fourcc		= V4L2_PIX_FMT_JPEG,
 		.color		= FIMC_FMT_JPEG,
 		.depth		= { 8 },
@@ -189,7 +170,6 @@ static struct fimc_fmt fimc_formats[] = {
 		.mbus_code	= MEDIA_BUS_FMT_JPEG_1X8,
 		.flags		= FMT_FLAGS_CAM | FMT_FLAGS_COMPRESSED,
 	}, {
-		.name		= "S5C73MX interleaved UYVY/JPEG",
 		.fourcc		= V4L2_PIX_FMT_S5C_UYVY_JPG,
 		.color		= FIMC_FMT_YUYV_JPEG,
 		.depth		= { 8 },
diff --git a/drivers/media/platform/exynos4-is/fimc-isp-video.c b/drivers/media/platform/exynos4-is/fimc-isp-video.c
index 2226a13ac89b..ec7a97e7582d 100644
--- a/drivers/media/platform/exynos4-is/fimc-isp-video.c
+++ b/drivers/media/platform/exynos4-is/fimc-isp-video.c
@@ -365,7 +365,6 @@ static int isp_video_enum_fmt(struct file *file, void *priv,
 	if (WARN_ON(fmt == NULL))
 		return -EINVAL;
 
-	strscpy(f->description, fmt->name, sizeof(f->description));
 	f->pixelformat = fmt->fourcc;
 
 	return 0;
diff --git a/drivers/media/platform/exynos4-is/fimc-isp.c b/drivers/media/platform/exynos4-is/fimc-isp.c
index 9a48c0f69320..dfb8285e4f0b 100644
--- a/drivers/media/platform/exynos4-is/fimc-isp.c
+++ b/drivers/media/platform/exynos4-is/fimc-isp.c
@@ -36,21 +36,18 @@ module_param_named(debug_isp, fimc_isp_debug, int, S_IRUGO | S_IWUSR);
 
 static const struct fimc_fmt fimc_isp_formats[FIMC_ISP_NUM_FORMATS] = {
 	{
-		.name		= "RAW8 (GRBG)",
 		.fourcc		= V4L2_PIX_FMT_SGRBG8,
 		.depth		= { 8 },
 		.color		= FIMC_FMT_RAW8,
 		.memplanes	= 1,
 		.mbus_code	= MEDIA_BUS_FMT_SGRBG8_1X8,
 	}, {
-		.name		= "RAW10 (GRBG)",
 		.fourcc		= V4L2_PIX_FMT_SGRBG10,
 		.depth		= { 10 },
 		.color		= FIMC_FMT_RAW10,
 		.memplanes	= 1,
 		.mbus_code	= MEDIA_BUS_FMT_SGRBG10_1X10,
 	}, {
-		.name		= "RAW12 (GRBG)",
 		.fourcc		= V4L2_PIX_FMT_SGRBG12,
 		.depth		= { 12 },
 		.color		= FIMC_FMT_RAW12,
diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c
index e71342756d88..91580b59e972 100644
--- a/drivers/media/platform/exynos4-is/fimc-lite.c
+++ b/drivers/media/platform/exynos4-is/fimc-lite.c
@@ -42,7 +42,6 @@ module_param(debug, int, 0644);
 
 static const struct fimc_fmt fimc_lite_formats[] = {
 	{
-		.name		= "YUV 4:2:2 packed, YCbYCr",
 		.fourcc		= V4L2_PIX_FMT_YUYV,
 		.colorspace	= V4L2_COLORSPACE_JPEG,
 		.depth		= { 16 },
@@ -51,7 +50,6 @@ static const struct fimc_fmt fimc_lite_formats[] = {
 		.mbus_code	= MEDIA_BUS_FMT_YUYV8_2X8,
 		.flags		= FMT_FLAGS_YUV,
 	}, {
-		.name		= "YUV 4:2:2 packed, CbYCrY",
 		.fourcc		= V4L2_PIX_FMT_UYVY,
 		.colorspace	= V4L2_COLORSPACE_JPEG,
 		.depth		= { 16 },
@@ -60,7 +58,6 @@ static const struct fimc_fmt fimc_lite_formats[] = {
 		.mbus_code	= MEDIA_BUS_FMT_UYVY8_2X8,
 		.flags		= FMT_FLAGS_YUV,
 	}, {
-		.name		= "YUV 4:2:2 packed, CrYCbY",
 		.fourcc		= V4L2_PIX_FMT_VYUY,
 		.colorspace	= V4L2_COLORSPACE_JPEG,
 		.depth		= { 16 },
@@ -69,7 +66,6 @@ static const struct fimc_fmt fimc_lite_formats[] = {
 		.mbus_code	= MEDIA_BUS_FMT_VYUY8_2X8,
 		.flags		= FMT_FLAGS_YUV,
 	}, {
-		.name		= "YUV 4:2:2 packed, YCrYCb",
 		.fourcc		= V4L2_PIX_FMT_YVYU,
 		.colorspace	= V4L2_COLORSPACE_JPEG,
 		.depth		= { 16 },
@@ -78,7 +74,6 @@ static const struct fimc_fmt fimc_lite_formats[] = {
 		.mbus_code	= MEDIA_BUS_FMT_YVYU8_2X8,
 		.flags		= FMT_FLAGS_YUV,
 	}, {
-		.name		= "RAW8 (GRBG)",
 		.fourcc		= V4L2_PIX_FMT_SGRBG8,
 		.colorspace	= V4L2_COLORSPACE_SRGB,
 		.depth		= { 8 },
@@ -87,7 +82,6 @@ static const struct fimc_fmt fimc_lite_formats[] = {
 		.mbus_code	= MEDIA_BUS_FMT_SGRBG8_1X8,
 		.flags		= FMT_FLAGS_RAW_BAYER,
 	}, {
-		.name		= "RAW10 (GRBG)",
 		.fourcc		= V4L2_PIX_FMT_SGRBG10,
 		.colorspace	= V4L2_COLORSPACE_SRGB,
 		.depth		= { 16 },
@@ -96,7 +90,6 @@ static const struct fimc_fmt fimc_lite_formats[] = {
 		.mbus_code	= MEDIA_BUS_FMT_SGRBG10_1X10,
 		.flags		= FMT_FLAGS_RAW_BAYER,
 	}, {
-		.name		= "RAW12 (GRBG)",
 		.fourcc		= V4L2_PIX_FMT_SGRBG12,
 		.colorspace	= V4L2_COLORSPACE_SRGB,
 		.depth		= { 16 },
@@ -670,7 +663,6 @@ static int fimc_lite_enum_fmt(struct file *file, void *priv,
 		return -EINVAL;
 
 	fmt = &fimc_lite_formats[f->index];
-	strscpy(f->description, fmt->name, sizeof(f->description));
 	f->pixelformat = fmt->fourcc;
 
 	return 0;
diff --git a/drivers/media/platform/exynos4-is/fimc-m2m.c b/drivers/media/platform/exynos4-is/fimc-m2m.c
index 62e876fc3555..c70c2cbe3eb1 100644
--- a/drivers/media/platform/exynos4-is/fimc-m2m.c
+++ b/drivers/media/platform/exynos4-is/fimc-m2m.c
@@ -247,7 +247,6 @@ static int fimc_m2m_enum_fmt(struct file *file, void *priv,
 	if (!fmt)
 		return -EINVAL;
 
-	strscpy(f->description, fmt->name, sizeof(f->description));
 	f->pixelformat = fmt->fourcc;
 	return 0;
 }
diff --git a/drivers/media/platform/m2m-deinterlace.c b/drivers/media/platform/m2m-deinterlace.c
index beb7fd7442fb..e9310eeec6cf 100644
--- a/drivers/media/platform/m2m-deinterlace.c
+++ b/drivers/media/platform/m2m-deinterlace.c
@@ -37,7 +37,6 @@ module_param(debug, bool, 0644);
 	v4l2_dbg(1, debug, &dev->v4l2_dev, "%s: " fmt, __func__, ## arg)
 
 struct deinterlace_fmt {
-	char	*name;
 	u32	fourcc;
 	/* Types the format can be used for */
 	u32	types;
@@ -45,12 +44,10 @@ struct deinterlace_fmt {
 
 static struct deinterlace_fmt formats[] = {
 	{
-		.name	= "YUV 4:2:0 Planar",
 		.fourcc	= V4L2_PIX_FMT_YUV420,
 		.types	= MEM2MEM_CAPTURE | MEM2MEM_OUTPUT,
 	},
 	{
-		.name	= "YUYV 4:2:2",
 		.fourcc	= V4L2_PIX_FMT_YUYV,
 		.types	= MEM2MEM_CAPTURE | MEM2MEM_OUTPUT,
 	},
@@ -470,7 +467,6 @@ static int enum_fmt(struct v4l2_fmtdesc *f, u32 type)
 	if (i < NUM_FORMATS) {
 		/* Format found */
 		fmt = &formats[i];
-		strscpy(f->description, fmt->name, sizeof(f->description));
 		f->pixelformat = fmt->fourcc;
 		return 0;
 	}
diff --git a/drivers/media/platform/marvell-ccic/mcam-core.c b/drivers/media/platform/marvell-ccic/mcam-core.c
index dc30c48d4671..30ac454e702e 100644
--- a/drivers/media/platform/marvell-ccic/mcam-core.c
+++ b/drivers/media/platform/marvell-ccic/mcam-core.c
@@ -98,56 +98,48 @@ MODULE_PARM_DESC(buffer_mode,
 	container_of(notifier, struct mcam_camera, notifier)
 
 static struct mcam_format_struct {
-	__u8 *desc;
 	__u32 pixelformat;
 	int bpp;   /* Bytes per pixel */
 	bool planar;
 	u32 mbus_code;
 } mcam_formats[] = {
 	{
-		.desc		= "YUYV 4:2:2",
 		.pixelformat	= V4L2_PIX_FMT_YUYV,
 		.mbus_code	= MEDIA_BUS_FMT_YUYV8_2X8,
 		.bpp		= 2,
 		.planar		= false,
 	},
 	{
-		.desc		= "YVYU 4:2:2",
 		.pixelformat	= V4L2_PIX_FMT_YVYU,
 		.mbus_code	= MEDIA_BUS_FMT_YUYV8_2X8,
 		.bpp		= 2,
 		.planar		= false,
 	},
 	{
-		.desc		= "YUV 4:2:0 PLANAR",
 		.pixelformat	= V4L2_PIX_FMT_YUV420,
 		.mbus_code	= MEDIA_BUS_FMT_YUYV8_2X8,
 		.bpp		= 1,
 		.planar		= true,
 	},
 	{
-		.desc		= "YVU 4:2:0 PLANAR",
 		.pixelformat	= V4L2_PIX_FMT_YVU420,
 		.mbus_code	= MEDIA_BUS_FMT_YUYV8_2X8,
 		.bpp		= 1,
 		.planar		= true,
 	},
 	{
-		.desc		= "XRGB 444",
 		.pixelformat	= V4L2_PIX_FMT_XRGB444,
 		.mbus_code	= MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE,
 		.bpp		= 2,
 		.planar		= false,
 	},
 	{
-		.desc		= "RGB 565",
 		.pixelformat	= V4L2_PIX_FMT_RGB565,
 		.mbus_code	= MEDIA_BUS_FMT_RGB565_2X8_LE,
 		.bpp		= 2,
 		.planar		= false,
 	},
 	{
-		.desc		= "Raw RGB Bayer",
 		.pixelformat	= V4L2_PIX_FMT_SBGGR8,
 		.mbus_code	= MEDIA_BUS_FMT_SBGGR8_1X8,
 		.bpp		= 1,
@@ -1369,8 +1361,6 @@ static int mcam_vidioc_enum_fmt_vid_cap(struct file *filp,
 {
 	if (fmt->index >= N_MCAM_FMTS)
 		return -EINVAL;
-	strscpy(fmt->description, mcam_formats[fmt->index].desc,
-		sizeof(fmt->description));
 	fmt->pixelformat = mcam_formats[fmt->index].pixelformat;
 	return 0;
 }
diff --git a/drivers/media/platform/mx2_emmaprp.c b/drivers/media/platform/mx2_emmaprp.c
index 333324c75027..4d4225ab1589 100644
--- a/drivers/media/platform/mx2_emmaprp.c
+++ b/drivers/media/platform/mx2_emmaprp.c
@@ -145,7 +145,6 @@ module_param(debug, bool, 0644);
 #define PRP_INTR_ST_CH2OVF	(1 << 8)
 
 struct emmaprp_fmt {
-	char	*name;
 	u32	fourcc;
 	/* Types the format can be used for */
 	u32	types;
@@ -153,12 +152,10 @@ struct emmaprp_fmt {
 
 static struct emmaprp_fmt formats[] = {
 	{
-		.name	= "YUV 4:2:0 Planar",
 		.fourcc	= V4L2_PIX_FMT_YUV420,
 		.types	= MEM2MEM_CAPTURE,
 	},
 	{
-		.name	= "4:2:2, packed, YUYV",
 		.fourcc	= V4L2_PIX_FMT_YUYV,
 		.types	= MEM2MEM_OUTPUT,
 	},
@@ -409,7 +406,6 @@ static int enum_fmt(struct v4l2_fmtdesc *f, u32 type)
 	if (i < NUM_FORMATS) {
 		/* Format found */
 		fmt = &formats[i];
-		strscpy(f->description, fmt->name, sizeof(f->description) - 1);
 		f->pixelformat = fmt->fourcc;
 		return 0;
 	}
diff --git a/drivers/media/platform/omap/omap_vout.c b/drivers/media/platform/omap/omap_vout.c
index cb6a9e3946b6..1f6742536c46 100644
--- a/drivers/media/platform/omap/omap_vout.c
+++ b/drivers/media/platform/omap/omap_vout.c
@@ -114,14 +114,12 @@ static const struct v4l2_fmtdesc omap_formats[] = {
 		 *      Byte 0                    Byte 1
 		 *      g2 g1 g0 b4 b3 b2 b1 b0   r4 r3 r2 r1 r0 g5 g4 g3
 		 */
-		.description = "RGB565, le",
 		.pixelformat = V4L2_PIX_FMT_RGB565,
 	},
 	{
 		/* Note:  V4L2 defines RGB32 as: RGB-8-8-8-8  we use
 		 *  this for RGB24 unpack mode, the last 8 bits are ignored
 		 * */
-		.description = "RGB32, le",
 		.pixelformat = V4L2_PIX_FMT_RGB32,
 	},
 	{
@@ -129,15 +127,12 @@ static const struct v4l2_fmtdesc omap_formats[] = {
 		 *        this for RGB24 packed mode
 		 *
 		 */
-		.description = "RGB24, le",
 		.pixelformat = V4L2_PIX_FMT_RGB24,
 	},
 	{
-		.description = "YUYV (YUV 4:2:2), packed",
 		.pixelformat = V4L2_PIX_FMT_YUYV,
 	},
 	{
-		.description = "UYVY, packed",
 		.pixelformat = V4L2_PIX_FMT_UYVY,
 	},
 };
@@ -1060,8 +1055,6 @@ static int vidioc_enum_fmt_vid_out(struct file *file, void *fh,
 		return -EINVAL;
 
 	fmt->flags = omap_formats[index].flags;
-	strscpy(fmt->description, omap_formats[index].description,
-		sizeof(fmt->description));
 	fmt->pixelformat = omap_formats[index].pixelformat;
 
 	return 0;
diff --git a/drivers/media/platform/s3c-camif/camif-capture.c b/drivers/media/platform/s3c-camif/camif-capture.c
index c3fc94ef251e..93813d593a1d 100644
--- a/drivers/media/platform/s3c-camif/camif-capture.c
+++ b/drivers/media/platform/s3c-camif/camif-capture.c
@@ -688,10 +688,7 @@ static int s3c_camif_vidioc_enum_fmt(struct file *file, void *priv,
 	if (!fmt)
 		return -EINVAL;
 
-	strscpy(f->description, fmt->name, sizeof(f->description));
 	f->pixelformat = fmt->fourcc;
-
-	pr_debug("fmt(%d): %s\n", f->index, f->description);
 	return 0;
 }
 
@@ -805,10 +802,10 @@ static int s3c_camif_vidioc_s_fmt(struct file *file, void *priv,
 	if (vp->owner == NULL)
 		vp->owner = priv;
 
-	pr_debug("%ux%u. payload: %u. fmt: %s. %d %d. sizeimage: %d. bpl: %d\n",
-		out_frame->f_width, out_frame->f_height, vp->payload, fmt->name,
-		pix->width * pix->height * fmt->depth, fmt->depth,
-		pix->sizeimage, pix->bytesperline);
+	pr_debug("%ux%u. payload: %u. fmt: 0x%08x. %d %d. sizeimage: %d. bpl: %d\n",
+		 out_frame->f_width, out_frame->f_height, vp->payload,
+		 fmt->fourcc, pix->width * pix->height * fmt->depth,
+		 fmt->depth, pix->sizeimage, pix->bytesperline);
 
 	return 0;
 }
diff --git a/drivers/media/platform/s3c-camif/camif-core.c b/drivers/media/platform/s3c-camif/camif-core.c
index b05ce0149ca1..f0acd6edcbba 100644
--- a/drivers/media/platform/s3c-camif/camif-core.c
+++ b/drivers/media/platform/s3c-camif/camif-core.c
@@ -42,7 +42,6 @@ static char *camif_clocks[CLK_MAX_NUM] = {
 
 static const struct camif_fmt camif_formats[] = {
 	{
-		.name		= "YUV 4:2:2 planar, Y/Cb/Cr",
 		.fourcc		= V4L2_PIX_FMT_YUV422P,
 		.depth		= 16,
 		.ybpp		= 1,
@@ -51,7 +50,6 @@ static const struct camif_fmt camif_formats[] = {
 		.flags		= FMT_FL_S3C24XX_CODEC |
 				  FMT_FL_S3C64XX,
 	}, {
-		.name		= "YUV 4:2:0 planar, Y/Cb/Cr",
 		.fourcc		= V4L2_PIX_FMT_YUV420,
 		.depth		= 12,
 		.ybpp		= 1,
@@ -60,7 +58,6 @@ static const struct camif_fmt camif_formats[] = {
 		.flags		= FMT_FL_S3C24XX_CODEC |
 				  FMT_FL_S3C64XX,
 	}, {
-		.name		= "YVU 4:2:0 planar, Y/Cr/Cb",
 		.fourcc		= V4L2_PIX_FMT_YVU420,
 		.depth		= 12,
 		.ybpp		= 1,
@@ -69,7 +66,6 @@ static const struct camif_fmt camif_formats[] = {
 		.flags		= FMT_FL_S3C24XX_CODEC |
 				  FMT_FL_S3C64XX,
 	}, {
-		.name		= "RGB565, 16 bpp",
 		.fourcc		= V4L2_PIX_FMT_RGB565X,
 		.depth		= 16,
 		.ybpp		= 2,
@@ -78,7 +74,6 @@ static const struct camif_fmt camif_formats[] = {
 		.flags		= FMT_FL_S3C24XX_PREVIEW |
 				  FMT_FL_S3C64XX,
 	}, {
-		.name		= "XRGB8888, 32 bpp",
 		.fourcc		= V4L2_PIX_FMT_RGB32,
 		.depth		= 32,
 		.ybpp		= 4,
@@ -87,7 +82,6 @@ static const struct camif_fmt camif_formats[] = {
 		.flags		= FMT_FL_S3C24XX_PREVIEW |
 				  FMT_FL_S3C64XX,
 	}, {
-		.name		= "BGR666",
 		.fourcc		= V4L2_PIX_FMT_BGR666,
 		.depth		= 32,
 		.ybpp		= 4,
diff --git a/drivers/media/platform/s3c-camif/camif-core.h b/drivers/media/platform/s3c-camif/camif-core.h
index be5e7357dffc..b3e7ddd313f2 100644
--- a/drivers/media/platform/s3c-camif/camif-core.h
+++ b/drivers/media/platform/s3c-camif/camif-core.h
@@ -92,7 +92,6 @@ enum img_fmt {
  * @ybpp:      number of luminance bytes per pixel
  */
 struct camif_fmt {
-	char *name;
 	u32 fourcc;
 	u32 color;
 	u16 colplanes;
diff --git a/drivers/media/platform/s5p-g2d/g2d.c b/drivers/media/platform/s5p-g2d/g2d.c
index 152d192d5c3f..0c41bfcace7b 100644
--- a/drivers/media/platform/s5p-g2d/g2d.c
+++ b/drivers/media/platform/s5p-g2d/g2d.c
@@ -29,31 +29,26 @@
 
 static struct g2d_fmt formats[] = {
 	{
-		.name	= "XRGB_8888",
 		.fourcc	= V4L2_PIX_FMT_RGB32,
 		.depth	= 32,
 		.hw	= COLOR_MODE(ORDER_XRGB, MODE_XRGB_8888),
 	},
 	{
-		.name	= "RGB_565",
 		.fourcc	= V4L2_PIX_FMT_RGB565X,
 		.depth	= 16,
 		.hw	= COLOR_MODE(ORDER_XRGB, MODE_RGB_565),
 	},
 	{
-		.name	= "XRGB_1555",
 		.fourcc	= V4L2_PIX_FMT_RGB555X,
 		.depth	= 16,
 		.hw	= COLOR_MODE(ORDER_XRGB, MODE_XRGB_1555),
 	},
 	{
-		.name	= "XRGB_4444",
 		.fourcc	= V4L2_PIX_FMT_RGB444,
 		.depth	= 16,
 		.hw	= COLOR_MODE(ORDER_XRGB, MODE_XRGB_4444),
 	},
 	{
-		.name	= "PACKED_RGB_888",
 		.fourcc	= V4L2_PIX_FMT_RGB24,
 		.depth	= 24,
 		.hw	= COLOR_MODE(ORDER_XRGB, MODE_PACKED_RGB_888),
@@ -308,7 +303,6 @@ static int vidioc_enum_fmt(struct file *file, void *prv, struct v4l2_fmtdesc *f)
 		return -EINVAL;
 	fmt = &formats[f->index];
 	f->pixelformat = fmt->fourcc;
-	strscpy(f->description, fmt->name, sizeof(f->description));
 	return 0;
 }
 
diff --git a/drivers/media/platform/s5p-g2d/g2d.h b/drivers/media/platform/s5p-g2d/g2d.h
index def0ec0dabeb..c2309c1370da 100644
--- a/drivers/media/platform/s5p-g2d/g2d.h
+++ b/drivers/media/platform/s5p-g2d/g2d.h
@@ -61,7 +61,6 @@ struct g2d_ctx {
 };
 
 struct g2d_fmt {
-	char	*name;
 	u32	fourcc;
 	int	depth;
 	u32	hw;
diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c
index 8cc730eccb6c..8b9f0cfd6c9d 100644
--- a/drivers/media/platform/s5p-jpeg/jpeg-core.c
+++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c
@@ -38,7 +38,6 @@
 
 static struct s5p_jpeg_fmt sjpeg_formats[] = {
 	{
-		.name		= "JPEG JFIF",
 		.fourcc		= V4L2_PIX_FMT_JPEG,
 		.flags		= SJPEG_FMT_FLAG_ENC_CAPTURE |
 				  SJPEG_FMT_FLAG_DEC_OUTPUT |
@@ -47,7 +46,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
 				  SJPEG_FMT_FLAG_EXYNOS4,
 	},
 	{
-		.name		= "YUV 4:2:2 packed, YCbYCr",
 		.fourcc		= V4L2_PIX_FMT_YUYV,
 		.depth		= 16,
 		.colplanes	= 1,
@@ -60,7 +58,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
 		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_422,
 	},
 	{
-		.name		= "YUV 4:2:2 packed, YCbYCr",
 		.fourcc		= V4L2_PIX_FMT_YUYV,
 		.depth		= 16,
 		.colplanes	= 1,
@@ -73,7 +70,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
 		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_422,
 	},
 	{
-		.name		= "YUV 4:2:2 packed, YCbYCr",
 		.fourcc		= V4L2_PIX_FMT_YUYV,
 		.depth		= 16,
 		.colplanes	= 1,
@@ -86,7 +82,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
 		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_422,
 	},
 	{
-		.name		= "YUV 4:2:2 packed, YCrYCb",
 		.fourcc		= V4L2_PIX_FMT_YVYU,
 		.depth		= 16,
 		.colplanes	= 1,
@@ -99,7 +94,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
 		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_422,
 	},
 	{
-		.name		= "YUV 4:2:2 packed, YCrYCb",
 		.fourcc		= V4L2_PIX_FMT_YVYU,
 		.depth		= 16,
 		.colplanes	= 1,
@@ -112,7 +106,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
 		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_422,
 	},
 	{
-		.name		= "YUV 4:2:2 packed, YCrYCb",
 		.fourcc		= V4L2_PIX_FMT_UYVY,
 		.depth		= 16,
 		.colplanes	= 1,
@@ -125,7 +118,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
 		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_422,
 	},
 	{
-		.name		= "YUV 4:2:2 packed, YCrYCb",
 		.fourcc		= V4L2_PIX_FMT_VYUY,
 		.depth		= 16,
 		.colplanes	= 1,
@@ -138,7 +130,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
 		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_422,
 	},
 	{
-		.name		= "RGB565",
 		.fourcc		= V4L2_PIX_FMT_RGB565,
 		.depth		= 16,
 		.colplanes	= 1,
@@ -151,7 +142,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
 		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_444,
 	},
 	{
-		.name		= "RGB565",
 		.fourcc		= V4L2_PIX_FMT_RGB565,
 		.depth		= 16,
 		.colplanes	= 1,
@@ -164,7 +154,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
 		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_444,
 	},
 	{
-		.name		= "RGB565X",
 		.fourcc		= V4L2_PIX_FMT_RGB565X,
 		.depth		= 16,
 		.colplanes	= 1,
@@ -177,7 +166,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
 		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_444,
 	},
 	{
-		.name		= "RGB565",
 		.fourcc		= V4L2_PIX_FMT_RGB565,
 		.depth		= 16,
 		.colplanes	= 1,
@@ -189,7 +177,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
 		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_444,
 	},
 	{
-		.name		= "ARGB8888, 32 bpp",
 		.fourcc		= V4L2_PIX_FMT_RGB32,
 		.depth		= 32,
 		.colplanes	= 1,
@@ -202,7 +189,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
 		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_444,
 	},
 	{
-		.name		= "ARGB8888, 32 bpp",
 		.fourcc		= V4L2_PIX_FMT_RGB32,
 		.depth		= 32,
 		.colplanes	= 1,
@@ -215,7 +201,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
 		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_444,
 	},
 	{
-		.name		= "YUV 4:4:4 planar, Y/CbCr",
 		.fourcc		= V4L2_PIX_FMT_NV24,
 		.depth		= 24,
 		.colplanes	= 2,
@@ -228,7 +213,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
 		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_444,
 	},
 	{
-		.name		= "YUV 4:4:4 planar, Y/CrCb",
 		.fourcc		= V4L2_PIX_FMT_NV42,
 		.depth		= 24,
 		.colplanes	= 2,
@@ -241,7 +225,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
 		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_444,
 	},
 	{
-		.name		= "YUV 4:2:2 planar, Y/CrCb",
 		.fourcc		= V4L2_PIX_FMT_NV61,
 		.depth		= 16,
 		.colplanes	= 2,
@@ -254,7 +237,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
 		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_422,
 	},
 	{
-		.name		= "YUV 4:2:2 planar, Y/CbCr",
 		.fourcc		= V4L2_PIX_FMT_NV16,
 		.depth		= 16,
 		.colplanes	= 2,
@@ -267,7 +249,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
 		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_422,
 	},
 	{
-		.name		= "YUV 4:2:0 planar, Y/CbCr",
 		.fourcc		= V4L2_PIX_FMT_NV12,
 		.depth		= 12,
 		.colplanes	= 2,
@@ -280,7 +261,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
 		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_420,
 	},
 	{
-		.name		= "YUV 4:2:0 planar, Y/CbCr",
 		.fourcc		= V4L2_PIX_FMT_NV12,
 		.depth		= 12,
 		.colplanes	= 2,
@@ -293,7 +273,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
 		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_420,
 	},
 	{
-		.name		= "YUV 4:2:0 planar, Y/CbCr",
 		.fourcc		= V4L2_PIX_FMT_NV12,
 		.depth		= 12,
 		.colplanes	= 2,
@@ -306,7 +285,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
 		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_420,
 	},
 	{
-		.name		= "YUV 4:2:0 planar, Y/CrCb",
 		.fourcc		= V4L2_PIX_FMT_NV21,
 		.depth		= 12,
 		.colplanes	= 2,
@@ -319,7 +297,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
 		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_420,
 	},
 	{
-		.name		= "YUV 4:2:0 planar, Y/CrCb",
 		.fourcc		= V4L2_PIX_FMT_NV21,
 		.depth		= 12,
 		.colplanes	= 2,
@@ -333,7 +310,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
 		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_420,
 	},
 	{
-		.name		= "YUV 4:2:0 contiguous 3-planar, Y/Cb/Cr",
 		.fourcc		= V4L2_PIX_FMT_YUV420,
 		.depth		= 12,
 		.colplanes	= 3,
@@ -346,7 +322,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
 		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_420,
 	},
 	{
-		.name		= "YUV 4:2:0 contiguous 3-planar, Y/Cb/Cr",
 		.fourcc		= V4L2_PIX_FMT_YUV420,
 		.depth		= 12,
 		.colplanes	= 3,
@@ -359,7 +334,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
 		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_420,
 	},
 	{
-		.name		= "Gray",
 		.fourcc		= V4L2_PIX_FMT_GREY,
 		.depth		= 8,
 		.colplanes	= 1,
@@ -1317,7 +1291,6 @@ static int enum_fmt(struct s5p_jpeg_ctx *ctx,
 	if (i >= n)
 		return -EINVAL;
 
-	strscpy(f->description, sjpeg_formats[i].name, sizeof(f->description));
 	f->pixelformat = sjpeg_formats[i].fourcc;
 
 	return 0;
diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.h b/drivers/media/platform/s5p-jpeg/jpeg-core.h
index 144c102ff05f..7fabe743e6dd 100644
--- a/drivers/media/platform/s5p-jpeg/jpeg-core.h
+++ b/drivers/media/platform/s5p-jpeg/jpeg-core.h
@@ -153,7 +153,6 @@ struct s5p_jpeg_variant {
 
 /**
  * struct jpeg_fmt - driver's internal color format data
- * @name:	format description
  * @fourcc:	the fourcc code, 0 if not applicable
  * @depth:	number of bits per pixel
  * @colplanes:	number of color planes (1 for packed formats)
@@ -162,7 +161,6 @@ struct s5p_jpeg_variant {
  * @flags:	flags describing format applicability
  */
 struct s5p_jpeg_fmt {
-	char	*name;
 	u32	fourcc;
 	int	depth;
 	int	colplanes;
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
index 5dc086516360..96d1ecd1521b 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
@@ -718,7 +718,6 @@ struct s5p_mfc_ctx {
  *			used by the MFC
  */
 struct s5p_mfc_fmt {
-	char *name;
 	u32 fourcc;
 	u32 codec_mode;
 	enum s5p_mfc_fmt_type type;
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
index 4017c8b471f4..e7f186f90894 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
@@ -29,7 +29,6 @@
 
 static struct s5p_mfc_fmt formats[] = {
 	{
-		.name		= "4:2:0 2 Planes 16x16 Tiles",
 		.fourcc		= V4L2_PIX_FMT_NV12MT_16X16,
 		.codec_mode	= S5P_MFC_CODEC_NONE,
 		.type		= MFC_FMT_RAW,
@@ -37,7 +36,6 @@ static struct s5p_mfc_fmt formats[] = {
 		.versions	= MFC_V6_BIT | MFC_V7_BIT,
 	},
 	{
-		.name		= "4:2:0 2 Planes 64x32 Tiles",
 		.fourcc		= V4L2_PIX_FMT_NV12MT,
 		.codec_mode	= S5P_MFC_CODEC_NONE,
 		.type		= MFC_FMT_RAW,
@@ -45,7 +43,6 @@ static struct s5p_mfc_fmt formats[] = {
 		.versions	= MFC_V5_BIT,
 	},
 	{
-		.name		= "4:2:0 2 Planes Y/CbCr",
 		.fourcc		= V4L2_PIX_FMT_NV12M,
 		.codec_mode	= S5P_MFC_CODEC_NONE,
 		.type		= MFC_FMT_RAW,
@@ -53,7 +50,6 @@ static struct s5p_mfc_fmt formats[] = {
 		.versions	= MFC_V6PLUS_BITS,
 	},
 	{
-		.name		= "4:2:0 2 Planes Y/CrCb",
 		.fourcc		= V4L2_PIX_FMT_NV21M,
 		.codec_mode	= S5P_MFC_CODEC_NONE,
 		.type		= MFC_FMT_RAW,
@@ -61,7 +57,6 @@ static struct s5p_mfc_fmt formats[] = {
 		.versions	= MFC_V6PLUS_BITS,
 	},
 	{
-		.name		= "H264 Encoded Stream",
 		.fourcc		= V4L2_PIX_FMT_H264,
 		.codec_mode	= S5P_MFC_CODEC_H264_DEC,
 		.type		= MFC_FMT_DEC,
@@ -69,7 +64,6 @@ static struct s5p_mfc_fmt formats[] = {
 		.versions	= MFC_V5PLUS_BITS,
 	},
 	{
-		.name		= "H264/MVC Encoded Stream",
 		.fourcc		= V4L2_PIX_FMT_H264_MVC,
 		.codec_mode	= S5P_MFC_CODEC_H264_MVC_DEC,
 		.type		= MFC_FMT_DEC,
@@ -77,7 +71,6 @@ static struct s5p_mfc_fmt formats[] = {
 		.versions	= MFC_V6PLUS_BITS,
 	},
 	{
-		.name		= "H263 Encoded Stream",
 		.fourcc		= V4L2_PIX_FMT_H263,
 		.codec_mode	= S5P_MFC_CODEC_H263_DEC,
 		.type		= MFC_FMT_DEC,
@@ -85,7 +78,6 @@ static struct s5p_mfc_fmt formats[] = {
 		.versions	= MFC_V5PLUS_BITS,
 	},
 	{
-		.name		= "MPEG1 Encoded Stream",
 		.fourcc		= V4L2_PIX_FMT_MPEG1,
 		.codec_mode	= S5P_MFC_CODEC_MPEG2_DEC,
 		.type		= MFC_FMT_DEC,
@@ -93,7 +85,6 @@ static struct s5p_mfc_fmt formats[] = {
 		.versions	= MFC_V5PLUS_BITS,
 	},
 	{
-		.name		= "MPEG2 Encoded Stream",
 		.fourcc		= V4L2_PIX_FMT_MPEG2,
 		.codec_mode	= S5P_MFC_CODEC_MPEG2_DEC,
 		.type		= MFC_FMT_DEC,
@@ -101,7 +92,6 @@ static struct s5p_mfc_fmt formats[] = {
 		.versions	= MFC_V5PLUS_BITS,
 	},
 	{
-		.name		= "MPEG4 Encoded Stream",
 		.fourcc		= V4L2_PIX_FMT_MPEG4,
 		.codec_mode	= S5P_MFC_CODEC_MPEG4_DEC,
 		.type		= MFC_FMT_DEC,
@@ -109,7 +99,6 @@ static struct s5p_mfc_fmt formats[] = {
 		.versions	= MFC_V5PLUS_BITS,
 	},
 	{
-		.name		= "XviD Encoded Stream",
 		.fourcc		= V4L2_PIX_FMT_XVID,
 		.codec_mode	= S5P_MFC_CODEC_MPEG4_DEC,
 		.type		= MFC_FMT_DEC,
@@ -117,7 +106,6 @@ static struct s5p_mfc_fmt formats[] = {
 		.versions	= MFC_V5PLUS_BITS,
 	},
 	{
-		.name		= "VC1 Encoded Stream",
 		.fourcc		= V4L2_PIX_FMT_VC1_ANNEX_G,
 		.codec_mode	= S5P_MFC_CODEC_VC1_DEC,
 		.type		= MFC_FMT_DEC,
@@ -125,7 +113,6 @@ static struct s5p_mfc_fmt formats[] = {
 		.versions	= MFC_V5PLUS_BITS,
 	},
 	{
-		.name		= "VC1 RCV Encoded Stream",
 		.fourcc		= V4L2_PIX_FMT_VC1_ANNEX_L,
 		.codec_mode	= S5P_MFC_CODEC_VC1RCV_DEC,
 		.type		= MFC_FMT_DEC,
@@ -133,7 +120,6 @@ static struct s5p_mfc_fmt formats[] = {
 		.versions	= MFC_V5PLUS_BITS,
 	},
 	{
-		.name		= "VP8 Encoded Stream",
 		.fourcc		= V4L2_PIX_FMT_VP8,
 		.codec_mode	= S5P_MFC_CODEC_VP8_DEC,
 		.type		= MFC_FMT_DEC,
@@ -297,7 +283,6 @@ static int vidioc_enum_fmt(struct file *file, struct v4l2_fmtdesc *f,
 	if (i == ARRAY_SIZE(formats))
 		return -EINVAL;
 	fmt = &formats[i];
-	strscpy(f->description, fmt->name, sizeof(f->description));
 	f->pixelformat = fmt->fourcc;
 	return 0;
 }
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
index 97e76480e942..d33c03b0a1d4 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
@@ -32,7 +32,6 @@
 
 static struct s5p_mfc_fmt formats[] = {
 	{
-		.name		= "4:2:0 2 Planes 16x16 Tiles",
 		.fourcc		= V4L2_PIX_FMT_NV12MT_16X16,
 		.codec_mode	= S5P_MFC_CODEC_NONE,
 		.type		= MFC_FMT_RAW,
@@ -40,7 +39,6 @@ static struct s5p_mfc_fmt formats[] = {
 		.versions	= MFC_V6_BIT | MFC_V7_BIT,
 	},
 	{
-		.name		= "4:2:0 2 Planes 64x32 Tiles",
 		.fourcc		= V4L2_PIX_FMT_NV12MT,
 		.codec_mode	= S5P_MFC_CODEC_NONE,
 		.type		= MFC_FMT_RAW,
@@ -48,7 +46,6 @@ static struct s5p_mfc_fmt formats[] = {
 		.versions	= MFC_V5_BIT,
 	},
 	{
-		.name		= "4:2:0 2 Planes Y/CbCr",
 		.fourcc		= V4L2_PIX_FMT_NV12M,
 		.codec_mode	= S5P_MFC_CODEC_NONE,
 		.type		= MFC_FMT_RAW,
@@ -56,7 +53,6 @@ static struct s5p_mfc_fmt formats[] = {
 		.versions	= MFC_V5PLUS_BITS,
 	},
 	{
-		.name		= "4:2:0 2 Planes Y/CrCb",
 		.fourcc		= V4L2_PIX_FMT_NV21M,
 		.codec_mode	= S5P_MFC_CODEC_NONE,
 		.type		= MFC_FMT_RAW,
@@ -64,7 +60,6 @@ static struct s5p_mfc_fmt formats[] = {
 		.versions	= MFC_V6PLUS_BITS,
 	},
 	{
-		.name		= "H264 Encoded Stream",
 		.fourcc		= V4L2_PIX_FMT_H264,
 		.codec_mode	= S5P_MFC_CODEC_H264_ENC,
 		.type		= MFC_FMT_ENC,
@@ -72,7 +67,6 @@ static struct s5p_mfc_fmt formats[] = {
 		.versions	= MFC_V5PLUS_BITS,
 	},
 	{
-		.name		= "MPEG4 Encoded Stream",
 		.fourcc		= V4L2_PIX_FMT_MPEG4,
 		.codec_mode	= S5P_MFC_CODEC_MPEG4_ENC,
 		.type		= MFC_FMT_ENC,
@@ -80,7 +74,6 @@ static struct s5p_mfc_fmt formats[] = {
 		.versions	= MFC_V5PLUS_BITS,
 	},
 	{
-		.name		= "H263 Encoded Stream",
 		.fourcc		= V4L2_PIX_FMT_H263,
 		.codec_mode	= S5P_MFC_CODEC_H263_ENC,
 		.type		= MFC_FMT_ENC,
@@ -88,7 +81,6 @@ static struct s5p_mfc_fmt formats[] = {
 		.versions	= MFC_V5PLUS_BITS,
 	},
 	{
-		.name		= "VP8 Encoded Stream",
 		.fourcc		= V4L2_PIX_FMT_VP8,
 		.codec_mode	= S5P_MFC_CODEC_VP8_ENC,
 		.type		= MFC_FMT_ENC,
@@ -1333,8 +1325,6 @@ static int vidioc_enum_fmt(struct file *file, struct v4l2_fmtdesc *f,
 
 		if (j == f->index) {
 			fmt = &formats[i];
-			strscpy(f->description, fmt->name,
-				sizeof(f->description));
 			f->pixelformat = fmt->fourcc;
 			return 0;
 		}
diff --git a/drivers/media/platform/sh_veu.c b/drivers/media/platform/sh_veu.c
index 5a9ba05c996e..26360af2325e 100644
--- a/drivers/media/platform/sh_veu.c
+++ b/drivers/media/platform/sh_veu.c
@@ -86,7 +86,6 @@ struct sh_veu_file {
 };
 
 struct sh_veu_format {
-	char *name;
 	u32 fourcc;
 	unsigned int depth;
 	unsigned int ydepth;
@@ -144,14 +143,14 @@ enum sh_veu_fmt_idx {
  * aligned for NV24.
  */
 static const struct sh_veu_format sh_veu_fmt[] = {
-	[SH_VEU_FMT_NV12]   = { .ydepth = 8, .depth = 12, .name = "NV12", .fourcc = V4L2_PIX_FMT_NV12 },
-	[SH_VEU_FMT_NV16]   = { .ydepth = 8, .depth = 16, .name = "NV16", .fourcc = V4L2_PIX_FMT_NV16 },
-	[SH_VEU_FMT_NV24]   = { .ydepth = 8, .depth = 24, .name = "NV24", .fourcc = V4L2_PIX_FMT_NV24 },
-	[SH_VEU_FMT_RGB332] = { .ydepth = 8, .depth = 8, .name = "RGB332", .fourcc = V4L2_PIX_FMT_RGB332 },
-	[SH_VEU_FMT_RGB444] = { .ydepth = 16, .depth = 16, .name = "RGB444", .fourcc = V4L2_PIX_FMT_RGB444 },
-	[SH_VEU_FMT_RGB565] = { .ydepth = 16, .depth = 16, .name = "RGB565", .fourcc = V4L2_PIX_FMT_RGB565 },
-	[SH_VEU_FMT_RGB666] = { .ydepth = 32, .depth = 32, .name = "BGR666", .fourcc = V4L2_PIX_FMT_BGR666 },
-	[SH_VEU_FMT_RGB24]  = { .ydepth = 24, .depth = 24, .name = "RGB24", .fourcc = V4L2_PIX_FMT_RGB24 },
+	[SH_VEU_FMT_NV12]   = { .ydepth = 8, .depth = 12, .fourcc = V4L2_PIX_FMT_NV12 },
+	[SH_VEU_FMT_NV16]   = { .ydepth = 8, .depth = 16, .fourcc = V4L2_PIX_FMT_NV16 },
+	[SH_VEU_FMT_NV24]   = { .ydepth = 8, .depth = 24, .fourcc = V4L2_PIX_FMT_NV24 },
+	[SH_VEU_FMT_RGB332] = { .ydepth = 8, .depth = 8, .fourcc = V4L2_PIX_FMT_RGB332 },
+	[SH_VEU_FMT_RGB444] = { .ydepth = 16, .depth = 16, .fourcc = V4L2_PIX_FMT_RGB444 },
+	[SH_VEU_FMT_RGB565] = { .ydepth = 16, .depth = 16, .fourcc = V4L2_PIX_FMT_RGB565 },
+	[SH_VEU_FMT_RGB666] = { .ydepth = 32, .depth = 32, .fourcc = V4L2_PIX_FMT_BGR666 },
+	[SH_VEU_FMT_RGB24]  = { .ydepth = 24, .depth = 24, .fourcc = V4L2_PIX_FMT_RGB24 },
 };
 
 #define DEFAULT_IN_VFMT (struct sh_veu_vfmt){						\
@@ -359,8 +358,6 @@ static int sh_veu_enum_fmt(struct v4l2_fmtdesc *f, const int *fmt, int fmt_num)
 	if (f->index >= fmt_num)
 		return -EINVAL;
 
-	strscpy(f->description, sh_veu_fmt[fmt[f->index]].name,
-		sizeof(f->description));
 	f->pixelformat = sh_veu_fmt[fmt[f->index]].fourcc;
 	return 0;
 }
diff --git a/drivers/media/platform/sh_vou.c b/drivers/media/platform/sh_vou.c
index 5799aa4b9323..4fc1b4e11b70 100644
--- a/drivers/media/platform/sh_vou.c
+++ b/drivers/media/platform/sh_vou.c
@@ -138,7 +138,6 @@ static void sh_vou_reg_ab_set(struct sh_vou_device *vou_dev, unsigned int reg,
 
 struct sh_vou_fmt {
 	u32		pfmt;
-	char		*desc;
 	unsigned char	bpp;
 	unsigned char	bpl;
 	unsigned char	rgb;
@@ -152,7 +151,6 @@ static struct sh_vou_fmt vou_fmt[] = {
 		.pfmt	= V4L2_PIX_FMT_NV12,
 		.bpp	= 12,
 		.bpl	= 1,
-		.desc	= "YVU420 planar",
 		.yf	= 0,
 		.rgb	= 0,
 	},
@@ -160,7 +158,6 @@ static struct sh_vou_fmt vou_fmt[] = {
 		.pfmt	= V4L2_PIX_FMT_NV16,
 		.bpp	= 16,
 		.bpl	= 1,
-		.desc	= "YVYU planar",
 		.yf	= 1,
 		.rgb	= 0,
 	},
@@ -168,7 +165,6 @@ static struct sh_vou_fmt vou_fmt[] = {
 		.pfmt	= V4L2_PIX_FMT_RGB24,
 		.bpp	= 24,
 		.bpl	= 3,
-		.desc	= "RGB24",
 		.pkf	= 2,
 		.rgb	= 1,
 	},
@@ -176,7 +172,6 @@ static struct sh_vou_fmt vou_fmt[] = {
 		.pfmt	= V4L2_PIX_FMT_RGB565,
 		.bpp	= 16,
 		.bpl	= 2,
-		.desc	= "RGB565",
 		.pkf	= 3,
 		.rgb	= 1,
 	},
@@ -184,7 +179,6 @@ static struct sh_vou_fmt vou_fmt[] = {
 		.pfmt	= V4L2_PIX_FMT_RGB565X,
 		.bpp	= 16,
 		.bpl	= 2,
-		.desc	= "RGB565 byteswapped",
 		.pkf	= 3,
 		.rgb	= 1,
 	},
@@ -398,9 +392,6 @@ static int sh_vou_enum_fmt_vid_out(struct file *file, void  *priv,
 
 	dev_dbg(vou_dev->v4l2_dev.dev, "%s()\n", __func__);
 
-	fmt->type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
-	strscpy(fmt->description, vou_fmt[fmt->index].desc,
-		sizeof(fmt->description));
 	fmt->pixelformat = vou_fmt[fmt->index].pfmt;
 
 	return 0;
@@ -494,7 +485,8 @@ static void sh_vou_configure_geometry(struct sh_vou_device *vou_dev,
 	if (h_idx)
 		vouvcr |= (1 << 14) | vou_scale_v_fld[h_idx - 1];
 
-	dev_dbg(vou_dev->v4l2_dev.dev, "%s: scaling 0x%x\n", fmt->desc, vouvcr);
+	dev_dbg(vou_dev->v4l2_dev.dev, "0x%08x: scaling 0x%x\n",
+		fmt->pfmt, vouvcr);
 
 	/* To produce a colour bar for testing set bit 23 of VOUVCR */
 	sh_vou_reg_ab_write(vou_dev, VOUVCR, vouvcr);
diff --git a/drivers/media/platform/ti-vpe/vpe.c b/drivers/media/platform/ti-vpe/vpe.c
index 3f90f9413da1..a23eeba52723 100644
--- a/drivers/media/platform/ti-vpe/vpe.c
+++ b/drivers/media/platform/ti-vpe/vpe.c
@@ -227,7 +227,6 @@ static const struct vpe_port_data port_data[11] = {
 
 /* driver info for each of the supported video formats */
 struct vpe_fmt {
-	char	*name;			/* human-readable name */
 	u32	fourcc;			/* standard format identifier */
 	u8	types;			/* CAPTURE and/or OUTPUT */
 	u8	coplanar;		/* set for unpacked Luma and Chroma */
@@ -237,7 +236,6 @@ struct vpe_fmt {
 
 static struct vpe_fmt vpe_formats[] = {
 	{
-		.name		= "NV16 YUV 422 co-planar",
 		.fourcc		= V4L2_PIX_FMT_NV16,
 		.types		= VPE_FMT_TYPE_CAPTURE | VPE_FMT_TYPE_OUTPUT,
 		.coplanar	= 1,
@@ -246,7 +244,6 @@ static struct vpe_fmt vpe_formats[] = {
 				  },
 	},
 	{
-		.name		= "NV12 YUV 420 co-planar",
 		.fourcc		= V4L2_PIX_FMT_NV12,
 		.types		= VPE_FMT_TYPE_CAPTURE | VPE_FMT_TYPE_OUTPUT,
 		.coplanar	= 1,
@@ -255,7 +252,6 @@ static struct vpe_fmt vpe_formats[] = {
 				  },
 	},
 	{
-		.name		= "YUYV 422 packed",
 		.fourcc		= V4L2_PIX_FMT_YUYV,
 		.types		= VPE_FMT_TYPE_CAPTURE | VPE_FMT_TYPE_OUTPUT,
 		.coplanar	= 0,
@@ -263,7 +259,6 @@ static struct vpe_fmt vpe_formats[] = {
 				  },
 	},
 	{
-		.name		= "UYVY 422 packed",
 		.fourcc		= V4L2_PIX_FMT_UYVY,
 		.types		= VPE_FMT_TYPE_CAPTURE | VPE_FMT_TYPE_OUTPUT,
 		.coplanar	= 0,
@@ -271,7 +266,6 @@ static struct vpe_fmt vpe_formats[] = {
 				  },
 	},
 	{
-		.name		= "RGB888 packed",
 		.fourcc		= V4L2_PIX_FMT_RGB24,
 		.types		= VPE_FMT_TYPE_CAPTURE,
 		.coplanar	= 0,
@@ -279,7 +273,6 @@ static struct vpe_fmt vpe_formats[] = {
 				  },
 	},
 	{
-		.name		= "ARGB32",
 		.fourcc		= V4L2_PIX_FMT_RGB32,
 		.types		= VPE_FMT_TYPE_CAPTURE,
 		.coplanar	= 0,
@@ -287,7 +280,6 @@ static struct vpe_fmt vpe_formats[] = {
 				  },
 	},
 	{
-		.name		= "BGR888 packed",
 		.fourcc		= V4L2_PIX_FMT_BGR24,
 		.types		= VPE_FMT_TYPE_CAPTURE,
 		.coplanar	= 0,
@@ -295,7 +287,6 @@ static struct vpe_fmt vpe_formats[] = {
 				  },
 	},
 	{
-		.name		= "ABGR32",
 		.fourcc		= V4L2_PIX_FMT_BGR32,
 		.types		= VPE_FMT_TYPE_CAPTURE,
 		.coplanar	= 0,
@@ -303,7 +294,6 @@ static struct vpe_fmt vpe_formats[] = {
 				  },
 	},
 	{
-		.name		= "RGB565",
 		.fourcc		= V4L2_PIX_FMT_RGB565,
 		.types		= VPE_FMT_TYPE_CAPTURE,
 		.coplanar	= 0,
@@ -311,7 +301,6 @@ static struct vpe_fmt vpe_formats[] = {
 				  },
 	},
 	{
-		.name		= "RGB5551",
 		.fourcc		= V4L2_PIX_FMT_RGB555,
 		.types		= VPE_FMT_TYPE_CAPTURE,
 		.coplanar	= 0,
@@ -1517,7 +1506,6 @@ static int __enum_fmt(struct v4l2_fmtdesc *f, u32 type)
 	if (!fmt)
 		return -EINVAL;
 
-	strscpy(f->description, fmt->name, sizeof(f->description));
 	f->pixelformat = fmt->fourcc;
 	return 0;
 }
diff --git a/drivers/media/platform/via-camera.c b/drivers/media/platform/via-camera.c
index 038de7a2027a..d5f811820be9 100644
--- a/drivers/media/platform/via-camera.c
+++ b/drivers/media/platform/via-camera.c
@@ -142,13 +142,11 @@ static struct via_camera *via_cam_info;
  * now this information must be managed at this level too.
  */
 static struct via_format {
-	__u8 *desc;
 	__u32 pixelformat;
 	int bpp;   /* Bytes per pixel */
 	u32 mbus_code;
 } via_formats[] = {
 	{
-		.desc		= "YUYV 4:2:2",
 		.pixelformat	= V4L2_PIX_FMT_YUYV,
 		.mbus_code	= MEDIA_BUS_FMT_YUYV8_2X8,
 		.bpp		= 2,
@@ -860,8 +858,6 @@ static int viacam_enum_fmt_vid_cap(struct file *filp, void *priv,
 {
 	if (fmt->index >= N_VIA_FMTS)
 		return -EINVAL;
-	strscpy(fmt->description, via_formats[fmt->index].desc,
-		sizeof(fmt->description));
 	fmt->pixelformat = via_formats[fmt->index].pixelformat;
 	return 0;
 }
diff --git a/drivers/media/platform/xilinx/xilinx-dma.c b/drivers/media/platform/xilinx/xilinx-dma.c
index c9d5fdb2d407..7bd2600cdc9a 100644
--- a/drivers/media/platform/xilinx/xilinx-dma.c
+++ b/drivers/media/platform/xilinx/xilinx-dma.c
@@ -524,8 +524,6 @@ xvip_dma_enum_format(struct file *file, void *fh, struct v4l2_fmtdesc *f)
 		return -EINVAL;
 
 	f->pixelformat = dma->format.pixelformat;
-	strscpy(f->description, dma->fmtinfo->description,
-		sizeof(f->description));
 
 	return 0;
 }
diff --git a/drivers/media/platform/xilinx/xilinx-vip.c b/drivers/media/platform/xilinx/xilinx-vip.c
index 08a825c3a3f6..6ad61b08a31a 100644
--- a/drivers/media/platform/xilinx/xilinx-vip.c
+++ b/drivers/media/platform/xilinx/xilinx-vip.c
@@ -25,21 +25,21 @@
 
 static const struct xvip_video_format xvip_video_formats[] = {
 	{ XVIP_VF_YUV_422, 8, NULL, MEDIA_BUS_FMT_UYVY8_1X16,
-	  2, V4L2_PIX_FMT_YUYV, "4:2:2, packed, YUYV" },
+	  2, V4L2_PIX_FMT_YUYV },
 	{ XVIP_VF_YUV_444, 8, NULL, MEDIA_BUS_FMT_VUY8_1X24,
-	  3, V4L2_PIX_FMT_YUV444, "4:4:4, packed, YUYV" },
+	  3, V4L2_PIX_FMT_YUV444 },
 	{ XVIP_VF_RBG, 8, NULL, MEDIA_BUS_FMT_RBG888_1X24,
-	  3, 0, NULL },
+	  3, 0 },
 	{ XVIP_VF_MONO_SENSOR, 8, "mono", MEDIA_BUS_FMT_Y8_1X8,
-	  1, V4L2_PIX_FMT_GREY, "Greyscale 8-bit" },
+	  1, V4L2_PIX_FMT_GREY },
 	{ XVIP_VF_MONO_SENSOR, 8, "rggb", MEDIA_BUS_FMT_SRGGB8_1X8,
-	  1, V4L2_PIX_FMT_SRGGB8, "Bayer 8-bit RGGB" },
+	  1, V4L2_PIX_FMT_SRGGB8 },
 	{ XVIP_VF_MONO_SENSOR, 8, "grbg", MEDIA_BUS_FMT_SGRBG8_1X8,
-	  1, V4L2_PIX_FMT_SGRBG8, "Bayer 8-bit GRBG" },
+	  1, V4L2_PIX_FMT_SGRBG8 },
 	{ XVIP_VF_MONO_SENSOR, 8, "gbrg", MEDIA_BUS_FMT_SGBRG8_1X8,
-	  1, V4L2_PIX_FMT_SGBRG8, "Bayer 8-bit GBRG" },
+	  1, V4L2_PIX_FMT_SGBRG8 },
 	{ XVIP_VF_MONO_SENSOR, 8, "bggr", MEDIA_BUS_FMT_SBGGR8_1X8,
-	  1, V4L2_PIX_FMT_SBGGR8, "Bayer 8-bit BGGR" },
+	  1, V4L2_PIX_FMT_SBGGR8 },
 };
 
 /**
diff --git a/drivers/media/platform/xilinx/xilinx-vip.h b/drivers/media/platform/xilinx/xilinx-vip.h
index ba939dd52818..47da39211ae4 100644
--- a/drivers/media/platform/xilinx/xilinx-vip.h
+++ b/drivers/media/platform/xilinx/xilinx-vip.h
@@ -108,7 +108,6 @@ struct xvip_device {
  * @code: media bus format code
  * @bpp: bytes per pixel (when stored in memory)
  * @fourcc: V4L2 pixel format FCC identifier
- * @description: format description, suitable for userspace
  */
 struct xvip_video_format {
 	unsigned int vf_code;
@@ -117,7 +116,6 @@ struct xvip_video_format {
 	unsigned int code;
 	unsigned int bpp;
 	u32 fourcc;
-	const char *description;
 };
 
 const struct xvip_video_format *xvip_get_format_by_code(unsigned int code);
diff --git a/include/media/drv-intf/exynos-fimc.h b/include/media/drv-intf/exynos-fimc.h
index 54c214737142..bb846e167325 100644
--- a/include/media/drv-intf/exynos-fimc.h
+++ b/include/media/drv-intf/exynos-fimc.h
@@ -90,7 +90,6 @@ struct fimc_source_info {
 /**
  * struct fimc_fmt - color format data structure
  * @mbus_code: media bus pixel code, -1 if not applicable
- * @name: format description
  * @fourcc: fourcc code for this format, 0 if not applicable
  * @color: the driver's private color format id
  * @memplanes: number of physically non-contiguous data planes
@@ -102,7 +101,6 @@ struct fimc_source_info {
  */
 struct fimc_fmt {
 	u32 mbus_code;
-	char	*name;
 	u32	fourcc;
 	u32	color;
 	u16	memplanes;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 5/5] media/platform: don't set description in ENUM_FMT
  2019-06-26 11:27 ` [PATCH 5/5] media/platform: don't set description in ENUM_FMT Hans Verkuil
@ 2019-06-26 14:36   ` Benoit Parrot
  2019-06-26 17:08   ` Laurent Pinchart
  2019-07-01  7:40   ` Lad, Prabhakar
  2 siblings, 0 replies; 12+ messages in thread
From: Benoit Parrot @ 2019-06-26 14:36 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: linux-media, Laurent Pinchart, Prabhakar Lad, Sylwester Nawrocki,
	Jonathan Corbet, Jacopo Mondi

Hans Verkuil <hverkuil-cisco@xs4all.nl> wrote on Wed [2019-Jun-26 13:27:48 +0200]:
> The V4L2 core sets the format description and flags 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>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Prabhakar Lad <prabhakar.csengg@gmail.com>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Cc: Jonathan Corbet <corbet@lwn.net>
> Cc: Jacopo Mondi <jacopo@jmondi.org>
> Cc: Benoit Parrot <bparrot@ti.com>

For am437x-vpfe.c and ti-vpe/vpe.c 

Acked-by: Benoit Parrot <bparrot@ti.com>

> ---
>  drivers/media/platform/am437x/am437x-vpfe.c   | 18 ++-----------
>  drivers/media/platform/davinci/vpbe_display.c | 14 ++--------
>  drivers/media/platform/davinci/vpif_capture.c | 11 ++------
>  drivers/media/platform/davinci/vpif_display.c |  4 ---
>  drivers/media/platform/exynos-gsc/gsc-core.c  | 22 ---------------
>  drivers/media/platform/exynos-gsc/gsc-core.h  |  2 --
>  .../media/platform/exynos4-is/fimc-capture.c  |  3 ---
>  drivers/media/platform/exynos4-is/fimc-core.c | 20 --------------
>  .../platform/exynos4-is/fimc-isp-video.c      |  1 -
>  drivers/media/platform/exynos4-is/fimc-isp.c  |  3 ---
>  drivers/media/platform/exynos4-is/fimc-lite.c |  8 ------
>  drivers/media/platform/exynos4-is/fimc-m2m.c  |  1 -
>  drivers/media/platform/m2m-deinterlace.c      |  4 ---
>  .../media/platform/marvell-ccic/mcam-core.c   | 10 -------
>  drivers/media/platform/mx2_emmaprp.c          |  4 ---
>  drivers/media/platform/omap/omap_vout.c       |  7 -----
>  .../media/platform/s3c-camif/camif-capture.c  | 11 +++-----
>  drivers/media/platform/s3c-camif/camif-core.c |  6 -----
>  drivers/media/platform/s3c-camif/camif-core.h |  1 -
>  drivers/media/platform/s5p-g2d/g2d.c          |  6 -----
>  drivers/media/platform/s5p-g2d/g2d.h          |  1 -
>  drivers/media/platform/s5p-jpeg/jpeg-core.c   | 27 -------------------
>  drivers/media/platform/s5p-jpeg/jpeg-core.h   |  2 --
>  .../media/platform/s5p-mfc/s5p_mfc_common.h   |  1 -
>  drivers/media/platform/s5p-mfc/s5p_mfc_dec.c  | 15 -----------
>  drivers/media/platform/s5p-mfc/s5p_mfc_enc.c  | 10 -------
>  drivers/media/platform/sh_veu.c               | 19 ++++++-------
>  drivers/media/platform/sh_vou.c               | 12 ++-------
>  drivers/media/platform/ti-vpe/vpe.c           | 12 ---------
>  drivers/media/platform/via-camera.c           |  4 ---
>  drivers/media/platform/xilinx/xilinx-dma.c    |  2 --
>  drivers/media/platform/xilinx/xilinx-vip.c    | 16 +++++------
>  drivers/media/platform/xilinx/xilinx-vip.h    |  2 --
>  include/media/drv-intf/exynos-fimc.h          |  2 --
>  34 files changed, 28 insertions(+), 253 deletions(-)
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/5] v4l2-ioctl: add missing pixelformats
  2019-06-26 11:27 ` [PATCH 1/5] v4l2-ioctl: add missing pixelformats Hans Verkuil
@ 2019-06-26 16:31   ` Laurent Pinchart
  2019-06-26 16:50     ` Hans Verkuil
  0 siblings, 1 reply; 12+ messages in thread
From: Laurent Pinchart @ 2019-06-26 16:31 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: linux-media

Hi Hans,

Thank you for the patch.

On Wed, Jun 26, 2019 at 01:27:44PM +0200, Hans Verkuil wrote:
> The v4l_fill_fmtdesc() is supposed to be updated whenever a new pixelformat
> is added, but a bunch of recently added pixelformats were forgotten.

Sorry about forgetting tp update the code :-(

> Update the list.
> 
> Also change a few lower case words to upper case to keep the same style.
> 
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  drivers/media/v4l2-core/v4l2-ioctl.c | 29 ++++++++++++++++++++++------
>  1 file changed, 23 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
> index b1f4b991dba6..c1faa7ca1925 100644
> --- a/drivers/media/v4l2-core/v4l2-ioctl.c
> +++ b/drivers/media/v4l2-core/v4l2-ioctl.c
> @@ -1169,9 +1169,21 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
>  	case V4L2_PIX_FMT_RGB444:	descr = "16-bit A/XRGB 4-4-4-4"; break;
>  	case V4L2_PIX_FMT_ARGB444:	descr = "16-bit ARGB 4-4-4-4"; break;
>  	case V4L2_PIX_FMT_XRGB444:	descr = "16-bit XRGB 4-4-4-4"; break;
> +	case V4L2_PIX_FMT_RGBA444:	descr = "16-bit RGBA 4-4-4-4"; break;
> +	case V4L2_PIX_FMT_RGBX444:	descr = "16-bit RGBX 4-4-4-4"; break;
> +	case V4L2_PIX_FMT_ABGR444:	descr = "16-bit ABGR 4-4-4-4"; break;
> +	case V4L2_PIX_FMT_XBGR444:	descr = "16-bit XBGR 4-4-4-4"; break;
> +	case V4L2_PIX_FMT_BGRA444:	descr = "16-bit BGRA 4-4-4-4"; break;
> +	case V4L2_PIX_FMT_BGRX444:	descr = "16-bit BGRX 4-4-4-4"; break;
>  	case V4L2_PIX_FMT_RGB555:	descr = "16-bit A/XRGB 1-5-5-5"; break;
>  	case V4L2_PIX_FMT_ARGB555:	descr = "16-bit ARGB 1-5-5-5"; break;
>  	case V4L2_PIX_FMT_XRGB555:	descr = "16-bit XRGB 1-5-5-5"; break;
> +	case V4L2_PIX_FMT_ABGR555:	descr = "16-bit ABGR 1-5-5-5"; break;
> +	case V4L2_PIX_FMT_XBGR555:	descr = "16-bit XBGR 1-5-5-5"; break;
> +	case V4L2_PIX_FMT_RGBA555:	descr = "16-bit RGBA 1-5-5-5"; break;
> +	case V4L2_PIX_FMT_RGBX555:	descr = "16-bit RGBX 1-5-5-5"; break;
> +	case V4L2_PIX_FMT_BGRA555:	descr = "16-bit BGRA 1-5-5-5"; break;
> +	case V4L2_PIX_FMT_BGRX555:	descr = "16-bit BGRX 1-5-5-5"; break;

Should the last four formats be described as 5-5-5-1 to match the order
of the components ?

With or without this changed,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>  	case V4L2_PIX_FMT_RGB565:	descr = "16-bit RGB 5-6-5"; break;
>  	case V4L2_PIX_FMT_RGB555X:	descr = "16-bit A/XRGB 1-5-5-5 BE"; break;
>  	case V4L2_PIX_FMT_ARGB555X:	descr = "16-bit ARGB 1-5-5-5 BE"; break;
> @@ -1186,6 +1198,10 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
>  	case V4L2_PIX_FMT_RGB32:	descr = "32-bit A/XRGB 8-8-8-8"; break;
>  	case V4L2_PIX_FMT_ARGB32:	descr = "32-bit ARGB 8-8-8-8"; break;
>  	case V4L2_PIX_FMT_XRGB32:	descr = "32-bit XRGB 8-8-8-8"; break;
> +	case V4L2_PIX_FMT_BGRA32:	descr = "32-bit ABGR 8-8-8-8"; break;
> +	case V4L2_PIX_FMT_BGRX32:	descr = "32-bit XBGR 8-8-8-8"; break;
> +	case V4L2_PIX_FMT_RGBA32:	descr = "32-bit RGBA 8-8-8-8"; break;
> +	case V4L2_PIX_FMT_RGBX32:	descr = "32-bit RGBX 8-8-8-8"; break;
>  	case V4L2_PIX_FMT_GREY:		descr = "8-bit Greyscale"; break;
>  	case V4L2_PIX_FMT_Y4:		descr = "4-bit Greyscale"; break;
>  	case V4L2_PIX_FMT_Y6:		descr = "6-bit Greyscale"; break;
> @@ -1301,13 +1317,14 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
>  	case V4L2_SDR_FMT_PCU16BE:	descr = "Planar Complex U16BE"; break;
>  	case V4L2_SDR_FMT_PCU18BE:	descr = "Planar Complex U18BE"; break;
>  	case V4L2_SDR_FMT_PCU20BE:	descr = "Planar Complex U20BE"; break;
> -	case V4L2_TCH_FMT_DELTA_TD16:	descr = "16-bit signed deltas"; break;
> -	case V4L2_TCH_FMT_DELTA_TD08:	descr = "8-bit signed deltas"; break;
> -	case V4L2_TCH_FMT_TU16:		descr = "16-bit unsigned touch data"; break;
> -	case V4L2_TCH_FMT_TU08:		descr = "8-bit unsigned touch data"; break;
> +	case V4L2_TCH_FMT_DELTA_TD16:	descr = "16-bit Signed Deltas"; break;
> +	case V4L2_TCH_FMT_DELTA_TD08:	descr = "8-bit Signed Deltas"; break;
> +	case V4L2_TCH_FMT_TU16:		descr = "16-bit Unsigned Touch Data"; break;
> +	case V4L2_TCH_FMT_TU08:		descr = "8-bit Unsigned Touch Data"; break;
>  	case V4L2_META_FMT_VSP1_HGO:	descr = "R-Car VSP1 1-D Histogram"; break;
>  	case V4L2_META_FMT_VSP1_HGT:	descr = "R-Car VSP1 2-D Histogram"; break;
> -	case V4L2_META_FMT_UVC:		descr = "UVC payload header metadata"; break;
> +	case V4L2_META_FMT_UVC:		descr = "UVC Payload Header Metadata"; break;
> +	case V4L2_META_FMT_D4XX:	descr = "Intel D4xx UVC Metadata"; break;
>  
>  	default:
>  		/* Compressed formats */
> @@ -1326,7 +1343,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
>  		case V4L2_PIX_FMT_MPEG1:	descr = "MPEG-1 ES"; break;
>  		case V4L2_PIX_FMT_MPEG2:	descr = "MPEG-2 ES"; break;
>  		case V4L2_PIX_FMT_MPEG2_SLICE:	descr = "MPEG-2 Parsed Slice Data"; break;
> -		case V4L2_PIX_FMT_MPEG4:	descr = "MPEG-4 part 2 ES"; break;
> +		case V4L2_PIX_FMT_MPEG4:	descr = "MPEG-4 Part 2 ES"; break;
>  		case V4L2_PIX_FMT_XVID:		descr = "Xvid"; break;
>  		case V4L2_PIX_FMT_VC1_ANNEX_G:	descr = "VC-1 (SMPTE 412M Annex G)"; break;
>  		case V4L2_PIX_FMT_VC1_ANNEX_L:	descr = "VC-1 (SMPTE 412M Annex L)"; break;

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/5] v4l2-ioctl: add missing pixelformats
  2019-06-26 16:31   ` Laurent Pinchart
@ 2019-06-26 16:50     ` Hans Verkuil
  0 siblings, 0 replies; 12+ messages in thread
From: Hans Verkuil @ 2019-06-26 16:50 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: linux-media

On 6/26/19 6:31 PM, Laurent Pinchart wrote:
> Hi Hans,
> 
> Thank you for the patch.
> 
> On Wed, Jun 26, 2019 at 01:27:44PM +0200, Hans Verkuil wrote:
>> The v4l_fill_fmtdesc() is supposed to be updated whenever a new pixelformat
>> is added, but a bunch of recently added pixelformats were forgotten.
> 
> Sorry about forgetting tp update the code :-(
> 
>> Update the list.
>>
>> Also change a few lower case words to upper case to keep the same style.
>>
>> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
>> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>> ---
>>  drivers/media/v4l2-core/v4l2-ioctl.c | 29 ++++++++++++++++++++++------
>>  1 file changed, 23 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
>> index b1f4b991dba6..c1faa7ca1925 100644
>> --- a/drivers/media/v4l2-core/v4l2-ioctl.c
>> +++ b/drivers/media/v4l2-core/v4l2-ioctl.c
>> @@ -1169,9 +1169,21 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
>>  	case V4L2_PIX_FMT_RGB444:	descr = "16-bit A/XRGB 4-4-4-4"; break;
>>  	case V4L2_PIX_FMT_ARGB444:	descr = "16-bit ARGB 4-4-4-4"; break;
>>  	case V4L2_PIX_FMT_XRGB444:	descr = "16-bit XRGB 4-4-4-4"; break;
>> +	case V4L2_PIX_FMT_RGBA444:	descr = "16-bit RGBA 4-4-4-4"; break;
>> +	case V4L2_PIX_FMT_RGBX444:	descr = "16-bit RGBX 4-4-4-4"; break;
>> +	case V4L2_PIX_FMT_ABGR444:	descr = "16-bit ABGR 4-4-4-4"; break;
>> +	case V4L2_PIX_FMT_XBGR444:	descr = "16-bit XBGR 4-4-4-4"; break;
>> +	case V4L2_PIX_FMT_BGRA444:	descr = "16-bit BGRA 4-4-4-4"; break;
>> +	case V4L2_PIX_FMT_BGRX444:	descr = "16-bit BGRX 4-4-4-4"; break;
>>  	case V4L2_PIX_FMT_RGB555:	descr = "16-bit A/XRGB 1-5-5-5"; break;
>>  	case V4L2_PIX_FMT_ARGB555:	descr = "16-bit ARGB 1-5-5-5"; break;
>>  	case V4L2_PIX_FMT_XRGB555:	descr = "16-bit XRGB 1-5-5-5"; break;
>> +	case V4L2_PIX_FMT_ABGR555:	descr = "16-bit ABGR 1-5-5-5"; break;
>> +	case V4L2_PIX_FMT_XBGR555:	descr = "16-bit XBGR 1-5-5-5"; break;
>> +	case V4L2_PIX_FMT_RGBA555:	descr = "16-bit RGBA 1-5-5-5"; break;
>> +	case V4L2_PIX_FMT_RGBX555:	descr = "16-bit RGBX 1-5-5-5"; break;
>> +	case V4L2_PIX_FMT_BGRA555:	descr = "16-bit BGRA 1-5-5-5"; break;
>> +	case V4L2_PIX_FMT_BGRX555:	descr = "16-bit BGRX 1-5-5-5"; break;
> 
> Should the last four formats be described as 5-5-5-1 to match the order
> of the components ?

Good point. I'll take another look at that.

Regards,

	Hans

> 
> With or without this changed,
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
>>  	case V4L2_PIX_FMT_RGB565:	descr = "16-bit RGB 5-6-5"; break;
>>  	case V4L2_PIX_FMT_RGB555X:	descr = "16-bit A/XRGB 1-5-5-5 BE"; break;
>>  	case V4L2_PIX_FMT_ARGB555X:	descr = "16-bit ARGB 1-5-5-5 BE"; break;
>> @@ -1186,6 +1198,10 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
>>  	case V4L2_PIX_FMT_RGB32:	descr = "32-bit A/XRGB 8-8-8-8"; break;
>>  	case V4L2_PIX_FMT_ARGB32:	descr = "32-bit ARGB 8-8-8-8"; break;
>>  	case V4L2_PIX_FMT_XRGB32:	descr = "32-bit XRGB 8-8-8-8"; break;
>> +	case V4L2_PIX_FMT_BGRA32:	descr = "32-bit ABGR 8-8-8-8"; break;
>> +	case V4L2_PIX_FMT_BGRX32:	descr = "32-bit XBGR 8-8-8-8"; break;
>> +	case V4L2_PIX_FMT_RGBA32:	descr = "32-bit RGBA 8-8-8-8"; break;
>> +	case V4L2_PIX_FMT_RGBX32:	descr = "32-bit RGBX 8-8-8-8"; break;
>>  	case V4L2_PIX_FMT_GREY:		descr = "8-bit Greyscale"; break;
>>  	case V4L2_PIX_FMT_Y4:		descr = "4-bit Greyscale"; break;
>>  	case V4L2_PIX_FMT_Y6:		descr = "6-bit Greyscale"; break;
>> @@ -1301,13 +1317,14 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
>>  	case V4L2_SDR_FMT_PCU16BE:	descr = "Planar Complex U16BE"; break;
>>  	case V4L2_SDR_FMT_PCU18BE:	descr = "Planar Complex U18BE"; break;
>>  	case V4L2_SDR_FMT_PCU20BE:	descr = "Planar Complex U20BE"; break;
>> -	case V4L2_TCH_FMT_DELTA_TD16:	descr = "16-bit signed deltas"; break;
>> -	case V4L2_TCH_FMT_DELTA_TD08:	descr = "8-bit signed deltas"; break;
>> -	case V4L2_TCH_FMT_TU16:		descr = "16-bit unsigned touch data"; break;
>> -	case V4L2_TCH_FMT_TU08:		descr = "8-bit unsigned touch data"; break;
>> +	case V4L2_TCH_FMT_DELTA_TD16:	descr = "16-bit Signed Deltas"; break;
>> +	case V4L2_TCH_FMT_DELTA_TD08:	descr = "8-bit Signed Deltas"; break;
>> +	case V4L2_TCH_FMT_TU16:		descr = "16-bit Unsigned Touch Data"; break;
>> +	case V4L2_TCH_FMT_TU08:		descr = "8-bit Unsigned Touch Data"; break;
>>  	case V4L2_META_FMT_VSP1_HGO:	descr = "R-Car VSP1 1-D Histogram"; break;
>>  	case V4L2_META_FMT_VSP1_HGT:	descr = "R-Car VSP1 2-D Histogram"; break;
>> -	case V4L2_META_FMT_UVC:		descr = "UVC payload header metadata"; break;
>> +	case V4L2_META_FMT_UVC:		descr = "UVC Payload Header Metadata"; break;
>> +	case V4L2_META_FMT_D4XX:	descr = "Intel D4xx UVC Metadata"; break;
>>  
>>  	default:
>>  		/* Compressed formats */
>> @@ -1326,7 +1343,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
>>  		case V4L2_PIX_FMT_MPEG1:	descr = "MPEG-1 ES"; break;
>>  		case V4L2_PIX_FMT_MPEG2:	descr = "MPEG-2 ES"; break;
>>  		case V4L2_PIX_FMT_MPEG2_SLICE:	descr = "MPEG-2 Parsed Slice Data"; break;
>> -		case V4L2_PIX_FMT_MPEG4:	descr = "MPEG-4 part 2 ES"; break;
>> +		case V4L2_PIX_FMT_MPEG4:	descr = "MPEG-4 Part 2 ES"; break;
>>  		case V4L2_PIX_FMT_XVID:		descr = "Xvid"; break;
>>  		case V4L2_PIX_FMT_VC1_ANNEX_G:	descr = "VC-1 (SMPTE 412M Annex G)"; break;
>>  		case V4L2_PIX_FMT_VC1_ANNEX_L:	descr = "VC-1 (SMPTE 412M Annex L)"; break;
> 


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 4/5] drivers/staging/media: don't set description for ENUM_FMT
  2019-06-26 11:27 ` [PATCH 4/5] drivers/staging/media: " Hans Verkuil
@ 2019-06-26 16:55   ` Laurent Pinchart
  0 siblings, 0 replies; 12+ messages in thread
From: Laurent Pinchart @ 2019-06-26 16:55 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: linux-media, Dave Stevenson, Eric Anholt

Hi Hans,

Thank you for the patch.

On Wed, Jun 26, 2019 at 01:27:47PM +0200, Hans Verkuil wrote:
> The V4L2 core sets the format description and flags 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.
> 
> Note that bcm2835-camera.c: the formats array still stores the flags
> field for compressed formats since that information is used elsewhere
> in the driver. But enum_fmt doesn't use it anymore, since the core
> will set the COMPRESSED flag correctly.
> 
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Dave Stevenson <dave.stevenson@raspberrypi.org>
> Cc: Eric Anholt <eric@anholt.net>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/staging/media/omap4iss/iss_video.c    | 40 +++++++++----------
>  drivers/staging/media/omap4iss/iss_video.h    |  2 -
>  drivers/staging/media/soc_camera/soc_camera.c |  2 -
>  .../bcm2835-camera/bcm2835-camera.c           | 29 --------------
>  .../bcm2835-camera/mmal-common.h              |  1 -
>  include/media/drv-intf/soc_mediabus.h         |  2 -
>  6 files changed, 19 insertions(+), 57 deletions(-)
> 
> diff --git a/drivers/staging/media/omap4iss/iss_video.c b/drivers/staging/media/omap4iss/iss_video.c
> index c307707480f7..54144dc9f509 100644
> --- a/drivers/staging/media/omap4iss/iss_video.c
> +++ b/drivers/staging/media/omap4iss/iss_video.c
> @@ -31,61 +31,61 @@
>  static struct iss_format_info formats[] = {
>  	{ MEDIA_BUS_FMT_Y8_1X8, MEDIA_BUS_FMT_Y8_1X8,
>  	  MEDIA_BUS_FMT_Y8_1X8, MEDIA_BUS_FMT_Y8_1X8,
> -	  V4L2_PIX_FMT_GREY, 8, "Greyscale 8 bpp", },
> +	  V4L2_PIX_FMT_GREY, 8, },
>  	{ MEDIA_BUS_FMT_Y10_1X10, MEDIA_BUS_FMT_Y10_1X10,
>  	  MEDIA_BUS_FMT_Y10_1X10, MEDIA_BUS_FMT_Y8_1X8,
> -	  V4L2_PIX_FMT_Y10, 10, "Greyscale 10 bpp", },
> +	  V4L2_PIX_FMT_Y10, 10, },
>  	{ MEDIA_BUS_FMT_Y12_1X12, MEDIA_BUS_FMT_Y10_1X10,
>  	  MEDIA_BUS_FMT_Y12_1X12, MEDIA_BUS_FMT_Y8_1X8,
> -	  V4L2_PIX_FMT_Y12, 12, "Greyscale 12 bpp", },
> +	  V4L2_PIX_FMT_Y12, 12, },
>  	{ MEDIA_BUS_FMT_SBGGR8_1X8, MEDIA_BUS_FMT_SBGGR8_1X8,
>  	  MEDIA_BUS_FMT_SBGGR8_1X8, MEDIA_BUS_FMT_SBGGR8_1X8,
> -	  V4L2_PIX_FMT_SBGGR8, 8, "BGGR Bayer 8 bpp", },
> +	  V4L2_PIX_FMT_SBGGR8, 8, },
>  	{ MEDIA_BUS_FMT_SGBRG8_1X8, MEDIA_BUS_FMT_SGBRG8_1X8,
>  	  MEDIA_BUS_FMT_SGBRG8_1X8, MEDIA_BUS_FMT_SGBRG8_1X8,
> -	  V4L2_PIX_FMT_SGBRG8, 8, "GBRG Bayer 8 bpp", },
> +	  V4L2_PIX_FMT_SGBRG8, 8, },
>  	{ MEDIA_BUS_FMT_SGRBG8_1X8, MEDIA_BUS_FMT_SGRBG8_1X8,
>  	  MEDIA_BUS_FMT_SGRBG8_1X8, MEDIA_BUS_FMT_SGRBG8_1X8,
> -	  V4L2_PIX_FMT_SGRBG8, 8, "GRBG Bayer 8 bpp", },
> +	  V4L2_PIX_FMT_SGRBG8, 8, },
>  	{ MEDIA_BUS_FMT_SRGGB8_1X8, MEDIA_BUS_FMT_SRGGB8_1X8,
>  	  MEDIA_BUS_FMT_SRGGB8_1X8, MEDIA_BUS_FMT_SRGGB8_1X8,
> -	  V4L2_PIX_FMT_SRGGB8, 8, "RGGB Bayer 8 bpp", },
> +	  V4L2_PIX_FMT_SRGGB8, 8, },
>  	{ MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8, MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8,
>  	  MEDIA_BUS_FMT_SGRBG10_1X10, 0,
> -	  V4L2_PIX_FMT_SGRBG10DPCM8, 8, "GRBG Bayer 10 bpp DPCM8",  },
> +	  V4L2_PIX_FMT_SGRBG10DPCM8, 8, },
>  	{ MEDIA_BUS_FMT_SBGGR10_1X10, MEDIA_BUS_FMT_SBGGR10_1X10,
>  	  MEDIA_BUS_FMT_SBGGR10_1X10, MEDIA_BUS_FMT_SBGGR8_1X8,
> -	  V4L2_PIX_FMT_SBGGR10, 10, "BGGR Bayer 10 bpp", },
> +	  V4L2_PIX_FMT_SBGGR10, 10, },
>  	{ MEDIA_BUS_FMT_SGBRG10_1X10, MEDIA_BUS_FMT_SGBRG10_1X10,
>  	  MEDIA_BUS_FMT_SGBRG10_1X10, MEDIA_BUS_FMT_SGBRG8_1X8,
> -	  V4L2_PIX_FMT_SGBRG10, 10, "GBRG Bayer 10 bpp", },
> +	  V4L2_PIX_FMT_SGBRG10, 10, },
>  	{ MEDIA_BUS_FMT_SGRBG10_1X10, MEDIA_BUS_FMT_SGRBG10_1X10,
>  	  MEDIA_BUS_FMT_SGRBG10_1X10, MEDIA_BUS_FMT_SGRBG8_1X8,
> -	  V4L2_PIX_FMT_SGRBG10, 10, "GRBG Bayer 10 bpp", },
> +	  V4L2_PIX_FMT_SGRBG10, 10, },
>  	{ MEDIA_BUS_FMT_SRGGB10_1X10, MEDIA_BUS_FMT_SRGGB10_1X10,
>  	  MEDIA_BUS_FMT_SRGGB10_1X10, MEDIA_BUS_FMT_SRGGB8_1X8,
> -	  V4L2_PIX_FMT_SRGGB10, 10, "RGGB Bayer 10 bpp", },
> +	  V4L2_PIX_FMT_SRGGB10, 10, },
>  	{ MEDIA_BUS_FMT_SBGGR12_1X12, MEDIA_BUS_FMT_SBGGR10_1X10,
>  	  MEDIA_BUS_FMT_SBGGR12_1X12, MEDIA_BUS_FMT_SBGGR8_1X8,
> -	  V4L2_PIX_FMT_SBGGR12, 12, "BGGR Bayer 12 bpp", },
> +	  V4L2_PIX_FMT_SBGGR12, 12, },
>  	{ MEDIA_BUS_FMT_SGBRG12_1X12, MEDIA_BUS_FMT_SGBRG10_1X10,
>  	  MEDIA_BUS_FMT_SGBRG12_1X12, MEDIA_BUS_FMT_SGBRG8_1X8,
> -	  V4L2_PIX_FMT_SGBRG12, 12, "GBRG Bayer 12 bpp", },
> +	  V4L2_PIX_FMT_SGBRG12, 12, },
>  	{ MEDIA_BUS_FMT_SGRBG12_1X12, MEDIA_BUS_FMT_SGRBG10_1X10,
>  	  MEDIA_BUS_FMT_SGRBG12_1X12, MEDIA_BUS_FMT_SGRBG8_1X8,
> -	  V4L2_PIX_FMT_SGRBG12, 12, "GRBG Bayer 12 bpp", },
> +	  V4L2_PIX_FMT_SGRBG12, 12, },
>  	{ MEDIA_BUS_FMT_SRGGB12_1X12, MEDIA_BUS_FMT_SRGGB10_1X10,
>  	  MEDIA_BUS_FMT_SRGGB12_1X12, MEDIA_BUS_FMT_SRGGB8_1X8,
> -	  V4L2_PIX_FMT_SRGGB12, 12, "RGGB Bayer 12 bpp", },
> +	  V4L2_PIX_FMT_SRGGB12, 12, },
>  	{ MEDIA_BUS_FMT_UYVY8_1X16, MEDIA_BUS_FMT_UYVY8_1X16,
>  	  MEDIA_BUS_FMT_UYVY8_1X16, 0,
> -	  V4L2_PIX_FMT_UYVY, 16, "YUV 4:2:2 (UYVY)", },
> +	  V4L2_PIX_FMT_UYVY, 16, },
>  	{ MEDIA_BUS_FMT_YUYV8_1X16, MEDIA_BUS_FMT_YUYV8_1X16,
>  	  MEDIA_BUS_FMT_YUYV8_1X16, 0,
> -	  V4L2_PIX_FMT_YUYV, 16, "YUV 4:2:2 (YUYV)", },
> +	  V4L2_PIX_FMT_YUYV, 16, },
>  	{ MEDIA_BUS_FMT_YUYV8_1_5X8, MEDIA_BUS_FMT_YUYV8_1_5X8,
>  	  MEDIA_BUS_FMT_YUYV8_1_5X8, 0,
> -	  V4L2_PIX_FMT_NV12, 8, "YUV 4:2:0 (NV12)", },
> +	  V4L2_PIX_FMT_NV12, 8, },
>  };
>  
>  const struct iss_format_info *
> @@ -563,8 +563,6 @@ iss_video_enum_format(struct file *file, void *fh, struct v4l2_fmtdesc *f)
>  
>  		if (index == 0) {
>  			f->pixelformat = info->pixelformat;
> -			strscpy(f->description, info->description,
> -				sizeof(f->description));
>  			return 0;
>  		}
>  
> diff --git a/drivers/staging/media/omap4iss/iss_video.h b/drivers/staging/media/omap4iss/iss_video.h
> index f22489edb562..8b3dd92021e1 100644
> --- a/drivers/staging/media/omap4iss/iss_video.h
> +++ b/drivers/staging/media/omap4iss/iss_video.h
> @@ -36,7 +36,6 @@ struct v4l2_pix_format;
>   *	shifted to be 8 bits per pixel. =0 if format is not shiftable.
>   * @pixelformat: V4L2 pixel format FCC identifier
>   * @bpp: Bits per pixel
> - * @description: Human-readable format description
>   */
>  struct iss_format_info {
>  	u32 code;
> @@ -45,7 +44,6 @@ struct iss_format_info {
>  	u32 flavor;
>  	u32 pixelformat;
>  	unsigned int bpp;
> -	const char *description;
>  };
>  
>  enum iss_pipeline_stream_state {
> diff --git a/drivers/staging/media/soc_camera/soc_camera.c b/drivers/staging/media/soc_camera/soc_camera.c
> index a6232dcd59bc..7b9448e3c9ba 100644
> --- a/drivers/staging/media/soc_camera/soc_camera.c
> +++ b/drivers/staging/media/soc_camera/soc_camera.c
> @@ -869,8 +869,6 @@ static int soc_camera_enum_fmt_vid_cap(struct file *file, void  *priv,
>  
>  	format = icd->user_formats[f->index].host_fmt;
>  
> -	if (format->name)
> -		strscpy(f->description, format->name, sizeof(f->description));
>  	f->pixelformat = format->fourcc;
>  	return 0;
>  }
> diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> index 49d0470f9a7e..07254a843ef3 100644
> --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> @@ -74,34 +74,27 @@ static const struct v4l2_fract
>  /* video formats */
>  static struct mmal_fmt formats[] = {
>  	{
> -		.name = "4:2:0, planar, YUV",
>  		.fourcc = V4L2_PIX_FMT_YUV420,
> -		.flags = 0,
>  		.mmal = MMAL_ENCODING_I420,
>  		.depth = 12,
>  		.mmal_component = MMAL_COMPONENT_CAMERA,
>  		.ybbp = 1,
>  		.remove_padding = 1,
>  	}, {
> -		.name = "4:2:2, packed, YUYV",
>  		.fourcc = V4L2_PIX_FMT_YUYV,
> -		.flags = 0,
>  		.mmal = MMAL_ENCODING_YUYV,
>  		.depth = 16,
>  		.mmal_component = MMAL_COMPONENT_CAMERA,
>  		.ybbp = 2,
>  		.remove_padding = 0,
>  	}, {
> -		.name = "RGB24 (LE)",
>  		.fourcc = V4L2_PIX_FMT_RGB24,
> -		.flags = 0,
>  		.mmal = MMAL_ENCODING_RGB24,
>  		.depth = 24,
>  		.mmal_component = MMAL_COMPONENT_CAMERA,
>  		.ybbp = 3,
>  		.remove_padding = 0,
>  	}, {
> -		.name = "JPEG",
>  		.fourcc = V4L2_PIX_FMT_JPEG,
>  		.flags = V4L2_FMT_FLAG_COMPRESSED,
>  		.mmal = MMAL_ENCODING_JPEG,
> @@ -110,7 +103,6 @@ static struct mmal_fmt formats[] = {
>  		.ybbp = 0,
>  		.remove_padding = 0,
>  	}, {
> -		.name = "H264",
>  		.fourcc = V4L2_PIX_FMT_H264,
>  		.flags = V4L2_FMT_FLAG_COMPRESSED,
>  		.mmal = MMAL_ENCODING_H264,
> @@ -119,7 +111,6 @@ static struct mmal_fmt formats[] = {
>  		.ybbp = 0,
>  		.remove_padding = 0,
>  	}, {
> -		.name = "MJPEG",
>  		.fourcc = V4L2_PIX_FMT_MJPEG,
>  		.flags = V4L2_FMT_FLAG_COMPRESSED,
>  		.mmal = MMAL_ENCODING_MJPEG,
> @@ -128,72 +119,56 @@ static struct mmal_fmt formats[] = {
>  		.ybbp = 0,
>  		.remove_padding = 0,
>  	}, {
> -		.name = "4:2:2, packed, YVYU",
>  		.fourcc = V4L2_PIX_FMT_YVYU,
> -		.flags = 0,
>  		.mmal = MMAL_ENCODING_YVYU,
>  		.depth = 16,
>  		.mmal_component = MMAL_COMPONENT_CAMERA,
>  		.ybbp = 2,
>  		.remove_padding = 0,
>  	}, {
> -		.name = "4:2:2, packed, VYUY",
>  		.fourcc = V4L2_PIX_FMT_VYUY,
> -		.flags = 0,
>  		.mmal = MMAL_ENCODING_VYUY,
>  		.depth = 16,
>  		.mmal_component = MMAL_COMPONENT_CAMERA,
>  		.ybbp = 2,
>  		.remove_padding = 0,
>  	}, {
> -		.name = "4:2:2, packed, UYVY",
>  		.fourcc = V4L2_PIX_FMT_UYVY,
> -		.flags = 0,
>  		.mmal = MMAL_ENCODING_UYVY,
>  		.depth = 16,
>  		.mmal_component = MMAL_COMPONENT_CAMERA,
>  		.ybbp = 2,
>  		.remove_padding = 0,
>  	}, {
> -		.name = "4:2:0, planar, NV12",
>  		.fourcc = V4L2_PIX_FMT_NV12,
> -		.flags = 0,
>  		.mmal = MMAL_ENCODING_NV12,
>  		.depth = 12,
>  		.mmal_component = MMAL_COMPONENT_CAMERA,
>  		.ybbp = 1,
>  		.remove_padding = 1,
>  	}, {
> -		.name = "RGB24 (BE)",
>  		.fourcc = V4L2_PIX_FMT_BGR24,
> -		.flags = 0,
>  		.mmal = MMAL_ENCODING_BGR24,
>  		.depth = 24,
>  		.mmal_component = MMAL_COMPONENT_CAMERA,
>  		.ybbp = 3,
>  		.remove_padding = 0,
>  	}, {
> -		.name = "4:2:0, planar, YVU",
>  		.fourcc = V4L2_PIX_FMT_YVU420,
> -		.flags = 0,
>  		.mmal = MMAL_ENCODING_YV12,
>  		.depth = 12,
>  		.mmal_component = MMAL_COMPONENT_CAMERA,
>  		.ybbp = 1,
>  		.remove_padding = 1,
>  	}, {
> -		.name = "4:2:0, planar, NV21",
>  		.fourcc = V4L2_PIX_FMT_NV21,
> -		.flags = 0,
>  		.mmal = MMAL_ENCODING_NV21,
>  		.depth = 12,
>  		.mmal_component = MMAL_COMPONENT_CAMERA,
>  		.ybbp = 1,
>  		.remove_padding = 1,
>  	}, {
> -		.name = "RGB32 (BE)",
>  		.fourcc = V4L2_PIX_FMT_BGR32,
> -		.flags = 0,
>  		.mmal = MMAL_ENCODING_BGRA,
>  		.depth = 32,
>  		.mmal_component = MMAL_COMPONENT_CAMERA,
> @@ -674,9 +649,7 @@ static int vidioc_enum_fmt_vid_overlay(struct file *file, void *priv,
>  
>  	fmt = &formats[f->index];
>  
> -	strlcpy((char *)f->description, fmt->name, sizeof(f->description));
>  	f->pixelformat = fmt->fourcc;
> -	f->flags = fmt->flags;
>  
>  	return 0;
>  }
> @@ -877,9 +850,7 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
>  
>  	fmt = &formats[f->index];
>  
> -	strlcpy((char *)f->description, fmt->name, sizeof(f->description));
>  	f->pixelformat = fmt->fourcc;
> -	f->flags = fmt->flags;
>  
>  	return 0;
>  }
> diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-common.h b/drivers/staging/vc04_services/bcm2835-camera/mmal-common.h
> index a20bf274a4fd..df4ecbfdbe4a 100644
> --- a/drivers/staging/vc04_services/bcm2835-camera/mmal-common.h
> +++ b/drivers/staging/vc04_services/bcm2835-camera/mmal-common.h
> @@ -23,7 +23,6 @@ struct mmal_msg_context;
>  
>  /* mapping between v4l and mmal video modes */
>  struct mmal_fmt {
> -	char  *name;
>  	u32   fourcc;          /* v4l2 format id */
>  	int   flags;           /* v4l2 flags field */
>  	u32   mmal;
> diff --git a/include/media/drv-intf/soc_mediabus.h b/include/media/drv-intf/soc_mediabus.h
> index 2ff773785fb6..28517ff9b4de 100644
> --- a/include/media/drv-intf/soc_mediabus.h
> +++ b/include/media/drv-intf/soc_mediabus.h
> @@ -69,7 +69,6 @@ enum soc_mbus_layout {
>  
>  /**
>   * struct soc_mbus_pixelfmt - Data format on the media bus
> - * @name:		Name of the format
>   * @fourcc:		Fourcc code, that will be obtained if the data is
>   *			stored in memory in the following way:
>   * @packing:		Type of sample-packing, that has to be used
> @@ -77,7 +76,6 @@ enum soc_mbus_layout {
>   * @bits_per_sample:	How many bits the bridge has to sample
>   */
>  struct soc_mbus_pixelfmt {
> -	const char		*name;
>  	u32			fourcc;
>  	enum soc_mbus_packing	packing;
>  	enum soc_mbus_order	order;

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 5/5] media/platform: don't set description in ENUM_FMT
  2019-06-26 11:27 ` [PATCH 5/5] media/platform: don't set description in ENUM_FMT Hans Verkuil
  2019-06-26 14:36   ` Benoit Parrot
@ 2019-06-26 17:08   ` Laurent Pinchart
  2019-07-01  7:40   ` Lad, Prabhakar
  2 siblings, 0 replies; 12+ messages in thread
From: Laurent Pinchart @ 2019-06-26 17:08 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: linux-media, Prabhakar Lad, Sylwester Nawrocki, Jonathan Corbet,
	Jacopo Mondi, Benoit Parrot

Hi Hans,

Thank you for the patch.

On Wed, Jun 26, 2019 at 01:27:48PM +0200, Hans Verkuil wrote:
> The V4L2 core sets the format description and flags 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>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Prabhakar Lad <prabhakar.csengg@gmail.com>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Cc: Jonathan Corbet <corbet@lwn.net>
> Cc: Jacopo Mondi <jacopo@jmondi.org>
> Cc: Benoit Parrot <bparrot@ti.com>
> ---
>  drivers/media/platform/am437x/am437x-vpfe.c   | 18 ++-----------
>  drivers/media/platform/davinci/vpbe_display.c | 14 ++--------
>  drivers/media/platform/davinci/vpif_capture.c | 11 ++------
>  drivers/media/platform/davinci/vpif_display.c |  4 ---
>  drivers/media/platform/exynos-gsc/gsc-core.c  | 22 ---------------
>  drivers/media/platform/exynos-gsc/gsc-core.h  |  2 --
>  .../media/platform/exynos4-is/fimc-capture.c  |  3 ---
>  drivers/media/platform/exynos4-is/fimc-core.c | 20 --------------
>  .../platform/exynos4-is/fimc-isp-video.c      |  1 -
>  drivers/media/platform/exynos4-is/fimc-isp.c  |  3 ---
>  drivers/media/platform/exynos4-is/fimc-lite.c |  8 ------
>  drivers/media/platform/exynos4-is/fimc-m2m.c  |  1 -
>  drivers/media/platform/m2m-deinterlace.c      |  4 ---
>  .../media/platform/marvell-ccic/mcam-core.c   | 10 -------
>  drivers/media/platform/mx2_emmaprp.c          |  4 ---
>  drivers/media/platform/omap/omap_vout.c       |  7 -----
>  .../media/platform/s3c-camif/camif-capture.c  | 11 +++-----
>  drivers/media/platform/s3c-camif/camif-core.c |  6 -----
>  drivers/media/platform/s3c-camif/camif-core.h |  1 -
>  drivers/media/platform/s5p-g2d/g2d.c          |  6 -----
>  drivers/media/platform/s5p-g2d/g2d.h          |  1 -
>  drivers/media/platform/s5p-jpeg/jpeg-core.c   | 27 -------------------
>  drivers/media/platform/s5p-jpeg/jpeg-core.h   |  2 --
>  .../media/platform/s5p-mfc/s5p_mfc_common.h   |  1 -
>  drivers/media/platform/s5p-mfc/s5p_mfc_dec.c  | 15 -----------
>  drivers/media/platform/s5p-mfc/s5p_mfc_enc.c  | 10 -------
>  drivers/media/platform/sh_veu.c               | 19 ++++++-------
>  drivers/media/platform/sh_vou.c               | 12 ++-------
>  drivers/media/platform/ti-vpe/vpe.c           | 12 ---------
>  drivers/media/platform/via-camera.c           |  4 ---
>  drivers/media/platform/xilinx/xilinx-dma.c    |  2 --
>  drivers/media/platform/xilinx/xilinx-vip.c    | 16 +++++------
>  drivers/media/platform/xilinx/xilinx-vip.h    |  2 --
>  include/media/drv-intf/exynos-fimc.h          |  2 --
>  34 files changed, 28 insertions(+), 253 deletions(-)
> 
> diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c
> index fe7b937eb5f2..7582c26f8459 100644
> --- a/drivers/media/platform/am437x/am437x-vpfe.c
> +++ b/drivers/media/platform/am437x/am437x-vpfe.c
> @@ -76,7 +76,6 @@ struct bus_format {
>  
>  /*
>   * struct vpfe_fmt - VPFE media bus format information
> - * @name: V4L2 format description
>   * @code: V4L2 media bus format code
>   * @shifted: V4L2 media bus format code for the same pixel layout but
>   *	shifted to be 8 bits per pixel. =0 if format is not shiftable.
> @@ -86,7 +85,6 @@ struct bus_format {
>   * @supported: Indicates format supported by subdev
>   */
>  struct vpfe_fmt {
> -	const char *name;
>  	u32 fourcc;
>  	u32 code;
>  	struct bus_format l;
> @@ -97,7 +95,6 @@ struct vpfe_fmt {
>  
>  static struct vpfe_fmt formats[] = {
>  	{
> -		.name		= "YUV 4:2:2 packed, YCbYCr",
>  		.fourcc		= V4L2_PIX_FMT_YUYV,
>  		.code		= MEDIA_BUS_FMT_YUYV8_2X8,
>  		.l.width	= 10,
> @@ -106,7 +103,6 @@ static struct vpfe_fmt formats[] = {
>  		.s.bpp		= 2,
>  		.supported	= false,
>  	}, {
> -		.name		= "YUV 4:2:2 packed, CbYCrY",
>  		.fourcc		= V4L2_PIX_FMT_UYVY,
>  		.code		= MEDIA_BUS_FMT_UYVY8_2X8,
>  		.l.width	= 10,
> @@ -115,7 +111,6 @@ static struct vpfe_fmt formats[] = {
>  		.s.bpp		= 2,
>  		.supported	= false,
>  	}, {
> -		.name		= "YUV 4:2:2 packed, YCrYCb",
>  		.fourcc		= V4L2_PIX_FMT_YVYU,
>  		.code		= MEDIA_BUS_FMT_YVYU8_2X8,
>  		.l.width	= 10,
> @@ -124,7 +119,6 @@ static struct vpfe_fmt formats[] = {
>  		.s.bpp		= 2,
>  		.supported	= false,
>  	}, {
> -		.name		= "YUV 4:2:2 packed, CrYCbY",
>  		.fourcc		= V4L2_PIX_FMT_VYUY,
>  		.code		= MEDIA_BUS_FMT_VYUY8_2X8,
>  		.l.width	= 10,
> @@ -133,7 +127,6 @@ static struct vpfe_fmt formats[] = {
>  		.s.bpp		= 2,
>  		.supported	= false,
>  	}, {
> -		.name		= "RAW8 BGGR",
>  		.fourcc		= V4L2_PIX_FMT_SBGGR8,
>  		.code		= MEDIA_BUS_FMT_SBGGR8_1X8,
>  		.l.width	= 10,
> @@ -142,7 +135,6 @@ static struct vpfe_fmt formats[] = {
>  		.s.bpp		= 1,
>  		.supported	= false,
>  	}, {
> -		.name		= "RAW8 GBRG",
>  		.fourcc		= V4L2_PIX_FMT_SGBRG8,
>  		.code		= MEDIA_BUS_FMT_SGBRG8_1X8,
>  		.l.width	= 10,
> @@ -151,7 +143,6 @@ static struct vpfe_fmt formats[] = {
>  		.s.bpp		= 1,
>  		.supported	= false,
>  	}, {
> -		.name		= "RAW8 GRBG",
>  		.fourcc		= V4L2_PIX_FMT_SGRBG8,
>  		.code		= MEDIA_BUS_FMT_SGRBG8_1X8,
>  		.l.width	= 10,
> @@ -160,7 +151,6 @@ static struct vpfe_fmt formats[] = {
>  		.s.bpp		= 1,
>  		.supported	= false,
>  	}, {
> -		.name		= "RAW8 RGGB",
>  		.fourcc		= V4L2_PIX_FMT_SRGGB8,
>  		.code		= MEDIA_BUS_FMT_SRGGB8_1X8,
>  		.l.width	= 10,
> @@ -169,7 +159,6 @@ static struct vpfe_fmt formats[] = {
>  		.s.bpp		= 1,
>  		.supported	= false,
>  	}, {
> -		.name		= "RGB565 (LE)",
>  		.fourcc		= V4L2_PIX_FMT_RGB565,
>  		.code		= MEDIA_BUS_FMT_RGB565_2X8_LE,
>  		.l.width	= 10,
> @@ -178,7 +167,6 @@ static struct vpfe_fmt formats[] = {
>  		.s.bpp		= 2,
>  		.supported	= false,
>  	}, {
> -		.name		= "RGB565 (BE)",
>  		.fourcc		= V4L2_PIX_FMT_RGB565X,
>  		.code		= MEDIA_BUS_FMT_RGB565_2X8_BE,
>  		.l.width	= 10,
> @@ -1540,12 +1528,10 @@ static int vpfe_enum_fmt(struct file *file, void  *priv,
>  	if (!fmt)
>  		return -EINVAL;
>  
> -	strscpy(f->description, fmt->name, sizeof(f->description));
>  	f->pixelformat = fmt->fourcc;
> -	f->type = vpfe->fmt.type;

The commit message should mention that you're also removing the
assignment of the type field.

>  
> -	vpfe_dbg(1, vpfe, "vpfe_enum_format: mbus index: %d code: %x pixelformat: %s [%s]\n",
> -		f->index, fmt->code, print_fourcc(fmt->fourcc), fmt->name);
> +	vpfe_dbg(1, vpfe, "vpfe_enum_format: mbus index: %d code: %x pixelformat: %s\n",
> +		 f->index, fmt->code, print_fourcc(fmt->fourcc));
>  
>  	return 0;
>  }
> diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c
> index 000b191c42d8..ed10a9bbf96b 100644
> --- a/drivers/media/platform/davinci/vpbe_display.c
> +++ b/drivers/media/platform/davinci/vpbe_display.c
> @@ -792,7 +792,6 @@ static int vpbe_display_enum_fmt(struct file *file, void  *priv,
>  {
>  	struct vpbe_layer *layer = video_drvdata(file);
>  	struct vpbe_device *vpbe_dev = layer->disp_dev->vpbe_dev;
> -	unsigned int index = 0;
>  
>  	v4l2_dbg(1, debug, &vpbe_dev->v4l2_dev,
>  				"VIDIOC_ENUM_FMT, layer id = %d\n",
> @@ -803,19 +802,10 @@ static int vpbe_display_enum_fmt(struct file *file, void  *priv,
>  	}
>  
>  	/* Fill in the information about format */
> -	index = fmt->index;
> -	memset(fmt, 0, sizeof(*fmt));
> -	fmt->index = index;
> -	fmt->type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
> -	if (index == 0) {
> -		strscpy(fmt->description, "YUV 4:2:2 - UYVY",
> -			sizeof(fmt->description));
> +	if (fmt->index == 0)
>  		fmt->pixelformat = V4L2_PIX_FMT_UYVY;
> -	} else {
> -		strscpy(fmt->description, "Y/CbCr 4:2:0",
> -			sizeof(fmt->description));
> +	else
>  		fmt->pixelformat = V4L2_PIX_FMT_NV12;
> -	}
>  
>  	return 0;
>  }
> diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c
> index f0f7ef638c56..621d28470d2b 100644
> --- a/drivers/media/platform/davinci/vpif_capture.c
> +++ b/drivers/media/platform/davinci/vpif_capture.c
> @@ -938,17 +938,10 @@ static int vpif_enum_fmt_vid_cap(struct file *file, void  *priv,
>  	}
>  
>  	/* Fill in the information about format */
> -	if (ch->vpifparams.iface.if_type == VPIF_IF_RAW_BAYER) {
> -		fmt->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
> -		strscpy(fmt->description, "Raw Mode -Bayer Pattern GrRBGb",
> -			sizeof(fmt->description));
> +	if (ch->vpifparams.iface.if_type == VPIF_IF_RAW_BAYER)
>  		fmt->pixelformat = V4L2_PIX_FMT_SBGGR8;
> -	} else {
> -		fmt->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
> -		strscpy(fmt->description, "YCbCr4:2:2 Semi-Planar",
> -			sizeof(fmt->description));
> +	else
>  		fmt->pixelformat = V4L2_PIX_FMT_NV16;
> -	}
>  	return 0;
>  }
>  
> diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c
> index a69897c68a50..be32f87001cd 100644
> --- a/drivers/media/platform/davinci/vpif_display.c
> +++ b/drivers/media/platform/davinci/vpif_display.c
> @@ -601,11 +601,7 @@ static int vpif_enum_fmt_vid_out(struct file *file, void  *priv,
>  		return -EINVAL;
>  
>  	/* Fill in the information about format */
> -	fmt->type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
> -	strscpy(fmt->description, "YCbCr4:2:2 YC Planar",
> -		sizeof(fmt->description));
>  	fmt->pixelformat = V4L2_PIX_FMT_YUV422P;
> -	fmt->flags = 0;
>  	return 0;
>  }
>  
> diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c
> index 854869f0024e..f6650b45bc3d 100644
> --- a/drivers/media/platform/exynos-gsc/gsc-core.c
> +++ b/drivers/media/platform/exynos-gsc/gsc-core.c
> @@ -27,21 +27,18 @@
>  
>  static const struct gsc_fmt gsc_formats[] = {
>  	{
> -		.name		= "RGB565",
>  		.pixelformat	= V4L2_PIX_FMT_RGB565X,
>  		.depth		= { 16 },
>  		.color		= GSC_RGB,
>  		.num_planes	= 1,
>  		.num_comp	= 1,
>  	}, {
> -		.name		= "BGRX-8-8-8-8, 32 bpp",
>  		.pixelformat	= V4L2_PIX_FMT_BGR32,
>  		.depth		= { 32 },
>  		.color		= GSC_RGB,
>  		.num_planes	= 1,
>  		.num_comp	= 1,
>  	}, {
> -		.name		= "YUV 4:2:2 packed, YCbYCr",
>  		.pixelformat	= V4L2_PIX_FMT_YUYV,
>  		.depth		= { 16 },
>  		.color		= GSC_YUV422,
> @@ -51,7 +48,6 @@ static const struct gsc_fmt gsc_formats[] = {
>  		.num_comp	= 1,
>  		.mbus_code	= MEDIA_BUS_FMT_YUYV8_2X8,
>  	}, {
> -		.name		= "YUV 4:2:2 packed, CbYCrY",
>  		.pixelformat	= V4L2_PIX_FMT_UYVY,
>  		.depth		= { 16 },
>  		.color		= GSC_YUV422,
> @@ -61,7 +57,6 @@ static const struct gsc_fmt gsc_formats[] = {
>  		.num_comp	= 1,
>  		.mbus_code	= MEDIA_BUS_FMT_UYVY8_2X8,
>  	}, {
> -		.name		= "YUV 4:2:2 packed, CrYCbY",
>  		.pixelformat	= V4L2_PIX_FMT_VYUY,
>  		.depth		= { 16 },
>  		.color		= GSC_YUV422,
> @@ -71,7 +66,6 @@ static const struct gsc_fmt gsc_formats[] = {
>  		.num_comp	= 1,
>  		.mbus_code	= MEDIA_BUS_FMT_VYUY8_2X8,
>  	}, {
> -		.name		= "YUV 4:2:2 packed, YCrYCb",
>  		.pixelformat	= V4L2_PIX_FMT_YVYU,
>  		.depth		= { 16 },
>  		.color		= GSC_YUV422,
> @@ -81,7 +75,6 @@ static const struct gsc_fmt gsc_formats[] = {
>  		.num_comp	= 1,
>  		.mbus_code	= MEDIA_BUS_FMT_YVYU8_2X8,
>  	}, {
> -		.name		= "YUV 4:4:4 planar, YCbYCr",
>  		.pixelformat	= V4L2_PIX_FMT_YUV32,
>  		.depth		= { 32 },
>  		.color		= GSC_YUV444,
> @@ -90,7 +83,6 @@ static const struct gsc_fmt gsc_formats[] = {
>  		.num_planes	= 1,
>  		.num_comp	= 1,
>  	}, {
> -		.name		= "YUV 4:2:2 planar, Y/Cb/Cr",
>  		.pixelformat	= V4L2_PIX_FMT_YUV422P,
>  		.depth		= { 16 },
>  		.color		= GSC_YUV422,
> @@ -99,7 +91,6 @@ static const struct gsc_fmt gsc_formats[] = {
>  		.num_planes	= 1,
>  		.num_comp	= 3,
>  	}, {
> -		.name		= "YUV 4:2:2 planar, Y/CbCr",
>  		.pixelformat	= V4L2_PIX_FMT_NV16,
>  		.depth		= { 16 },
>  		.color		= GSC_YUV422,
> @@ -108,7 +99,6 @@ static const struct gsc_fmt gsc_formats[] = {
>  		.num_planes	= 1,
>  		.num_comp	= 2,
>  	}, {
> -		.name		= "YUV 4:2:2 non-contig, Y/CbCr",
>  		.pixelformat	= V4L2_PIX_FMT_NV16M,
>  		.depth		= { 8, 8 },
>  		.color		= GSC_YUV422,
> @@ -117,7 +107,6 @@ static const struct gsc_fmt gsc_formats[] = {
>  		.num_planes	= 2,
>  		.num_comp	= 2,
>  	}, {
> -		.name		= "YUV 4:2:2 planar, Y/CrCb",
>  		.pixelformat	= V4L2_PIX_FMT_NV61,
>  		.depth		= { 16 },
>  		.color		= GSC_YUV422,
> @@ -126,7 +115,6 @@ static const struct gsc_fmt gsc_formats[] = {
>  		.num_planes	= 1,
>  		.num_comp	= 2,
>  	}, {
> -		.name		= "YUV 4:2:2 non-contig, Y/CrCb",
>  		.pixelformat	= V4L2_PIX_FMT_NV61M,
>  		.depth		= { 8, 8 },
>  		.color		= GSC_YUV422,
> @@ -135,7 +123,6 @@ static const struct gsc_fmt gsc_formats[] = {
>  		.num_planes	= 2,
>  		.num_comp	= 2,
>  	}, {
> -		.name		= "YUV 4:2:0 planar, YCbCr",
>  		.pixelformat	= V4L2_PIX_FMT_YUV420,
>  		.depth		= { 12 },
>  		.color		= GSC_YUV420,
> @@ -144,7 +131,6 @@ static const struct gsc_fmt gsc_formats[] = {
>  		.num_planes	= 1,
>  		.num_comp	= 3,
>  	}, {
> -		.name		= "YUV 4:2:0 planar, YCrCb",
>  		.pixelformat	= V4L2_PIX_FMT_YVU420,
>  		.depth		= { 12 },
>  		.color		= GSC_YUV420,
> @@ -154,7 +140,6 @@ static const struct gsc_fmt gsc_formats[] = {
>  		.num_comp	= 3,
>  
>  	}, {
> -		.name		= "YUV 4:2:0 planar, Y/CbCr",
>  		.pixelformat	= V4L2_PIX_FMT_NV12,
>  		.depth		= { 12 },
>  		.color		= GSC_YUV420,
> @@ -163,7 +148,6 @@ static const struct gsc_fmt gsc_formats[] = {
>  		.num_planes	= 1,
>  		.num_comp	= 2,
>  	}, {
> -		.name		= "YUV 4:2:0 planar, Y/CrCb",
>  		.pixelformat	= V4L2_PIX_FMT_NV21,
>  		.depth		= { 12 },
>  		.color		= GSC_YUV420,
> @@ -172,7 +156,6 @@ static const struct gsc_fmt gsc_formats[] = {
>  		.num_planes	= 1,
>  		.num_comp	= 2,
>  	}, {
> -		.name		= "YUV 4:2:0 non-contig. 2p, Y/CrCb",
>  		.pixelformat	= V4L2_PIX_FMT_NV21M,
>  		.depth		= { 8, 4 },
>  		.color		= GSC_YUV420,
> @@ -181,7 +164,6 @@ static const struct gsc_fmt gsc_formats[] = {
>  		.num_planes	= 2,
>  		.num_comp	= 2,
>  	}, {
> -		.name		= "YUV 4:2:0 non-contig. 2p, Y/CbCr",
>  		.pixelformat	= V4L2_PIX_FMT_NV12M,
>  		.depth		= { 8, 4 },
>  		.color		= GSC_YUV420,
> @@ -190,7 +172,6 @@ static const struct gsc_fmt gsc_formats[] = {
>  		.num_planes	= 2,
>  		.num_comp	= 2,
>  	}, {
> -		.name		= "YUV 4:2:0 non-contig. 3p, Y/Cb/Cr",
>  		.pixelformat	= V4L2_PIX_FMT_YUV420M,
>  		.depth		= { 8, 2, 2 },
>  		.color		= GSC_YUV420,
> @@ -199,7 +180,6 @@ static const struct gsc_fmt gsc_formats[] = {
>  		.num_planes	= 3,
>  		.num_comp	= 3,
>  	}, {
> -		.name		= "YUV 4:2:0 non-contig. 3p, Y/Cr/Cb",
>  		.pixelformat	= V4L2_PIX_FMT_YVU420M,
>  		.depth		= { 8, 2, 2 },
>  		.color		= GSC_YUV420,
> @@ -208,7 +188,6 @@ static const struct gsc_fmt gsc_formats[] = {
>  		.num_planes	= 3,
>  		.num_comp	= 3,
>  	}, {
> -		.name		= "YUV 4:2:0 n.c. 2p, Y/CbCr tiled",
>  		.pixelformat	= V4L2_PIX_FMT_NV12MT_16X16,
>  		.depth		= { 8, 4 },
>  		.color		= GSC_YUV420,
> @@ -335,7 +314,6 @@ int gsc_enum_fmt(struct v4l2_fmtdesc *f)
>  	if (!fmt)
>  		return -EINVAL;
>  
> -	strscpy(f->description, fmt->name, sizeof(f->description));
>  	f->pixelformat = fmt->pixelformat;
>  
>  	return 0;
> diff --git a/drivers/media/platform/exynos-gsc/gsc-core.h b/drivers/media/platform/exynos-gsc/gsc-core.h
> index 8ea49ca004fd..0e114f114c24 100644
> --- a/drivers/media/platform/exynos-gsc/gsc-core.h
> +++ b/drivers/media/platform/exynos-gsc/gsc-core.h
> @@ -105,7 +105,6 @@ enum gsc_yuv_fmt {
>  /**
>   * struct gsc_fmt - the driver's internal color format data
>   * @mbus_code: Media Bus pixel code, -1 if not applicable
> - * @name: format description
>   * @pixelformat: the fourcc code for this format, 0 if not applicable
>   * @yorder: Y/C order
>   * @corder: Chrominance order control
> @@ -116,7 +115,6 @@ enum gsc_yuv_fmt {
>   */
>  struct gsc_fmt {
>  	u32 mbus_code;
> -	char	*name;
>  	u32	pixelformat;
>  	u32	color;
>  	u32	yorder;
> diff --git a/drivers/media/platform/exynos4-is/fimc-capture.c b/drivers/media/platform/exynos4-is/fimc-capture.c
> index 84b91e248c5a..ab91e8e0b41c 100644
> --- a/drivers/media/platform/exynos4-is/fimc-capture.c
> +++ b/drivers/media/platform/exynos4-is/fimc-capture.c
> @@ -741,10 +741,7 @@ static int fimc_cap_enum_fmt(struct file *file, void *priv,
>  			       f->index);
>  	if (!fmt)
>  		return -EINVAL;
> -	strscpy(f->description, fmt->name, sizeof(f->description));
>  	f->pixelformat = fmt->fourcc;
> -	if (fmt->fourcc == MEDIA_BUS_FMT_JPEG_1X8)
> -		f->flags |= V4L2_FMT_FLAG_COMPRESSED;
>  	return 0;
>  }
>  
> diff --git a/drivers/media/platform/exynos4-is/fimc-core.c b/drivers/media/platform/exynos4-is/fimc-core.c
> index 7006f54bfee2..cde60fbb23a8 100644
> --- a/drivers/media/platform/exynos4-is/fimc-core.c
> +++ b/drivers/media/platform/exynos4-is/fimc-core.c
> @@ -36,7 +36,6 @@ static char *fimc_clocks[MAX_FIMC_CLOCKS] = {
>  
>  static struct fimc_fmt fimc_formats[] = {
>  	{
> -		.name		= "RGB565",
>  		.fourcc		= V4L2_PIX_FMT_RGB565,
>  		.depth		= { 16 },
>  		.color		= FIMC_FMT_RGB565,
> @@ -44,7 +43,6 @@ static struct fimc_fmt fimc_formats[] = {
>  		.colplanes	= 1,
>  		.flags		= FMT_FLAGS_M2M,
>  	}, {
> -		.name		= "BGR666",
>  		.fourcc		= V4L2_PIX_FMT_BGR666,
>  		.depth		= { 32 },
>  		.color		= FIMC_FMT_RGB666,
> @@ -52,7 +50,6 @@ static struct fimc_fmt fimc_formats[] = {
>  		.colplanes	= 1,
>  		.flags		= FMT_FLAGS_M2M,
>  	}, {
> -		.name		= "BGRA8888, 32 bpp",
>  		.fourcc		= V4L2_PIX_FMT_BGR32,
>  		.depth		= { 32 },
>  		.color		= FIMC_FMT_RGB888,
> @@ -60,7 +57,6 @@ static struct fimc_fmt fimc_formats[] = {
>  		.colplanes	= 1,
>  		.flags		= FMT_FLAGS_M2M | FMT_HAS_ALPHA,
>  	}, {
> -		.name		= "ARGB1555",
>  		.fourcc		= V4L2_PIX_FMT_RGB555,
>  		.depth		= { 16 },
>  		.color		= FIMC_FMT_RGB555,
> @@ -68,7 +64,6 @@ static struct fimc_fmt fimc_formats[] = {
>  		.colplanes	= 1,
>  		.flags		= FMT_FLAGS_M2M_OUT | FMT_HAS_ALPHA,
>  	}, {
> -		.name		= "ARGB4444",
>  		.fourcc		= V4L2_PIX_FMT_RGB444,
>  		.depth		= { 16 },
>  		.color		= FIMC_FMT_RGB444,
> @@ -76,11 +71,9 @@ static struct fimc_fmt fimc_formats[] = {
>  		.colplanes	= 1,
>  		.flags		= FMT_FLAGS_M2M_OUT | FMT_HAS_ALPHA,
>  	}, {
> -		.name		= "YUV 4:4:4",
>  		.mbus_code	= MEDIA_BUS_FMT_YUV10_1X30,
>  		.flags		= FMT_FLAGS_WRITEBACK,
>  	}, {
> -		.name		= "YUV 4:2:2 packed, YCbYCr",
>  		.fourcc		= V4L2_PIX_FMT_YUYV,
>  		.depth		= { 16 },
>  		.color		= FIMC_FMT_YCBYCR422,
> @@ -89,7 +82,6 @@ static struct fimc_fmt fimc_formats[] = {
>  		.mbus_code	= MEDIA_BUS_FMT_YUYV8_2X8,
>  		.flags		= FMT_FLAGS_M2M | FMT_FLAGS_CAM,
>  	}, {
> -		.name		= "YUV 4:2:2 packed, CbYCrY",
>  		.fourcc		= V4L2_PIX_FMT_UYVY,
>  		.depth		= { 16 },
>  		.color		= FIMC_FMT_CBYCRY422,
> @@ -98,7 +90,6 @@ static struct fimc_fmt fimc_formats[] = {
>  		.mbus_code	= MEDIA_BUS_FMT_UYVY8_2X8,
>  		.flags		= FMT_FLAGS_M2M | FMT_FLAGS_CAM,
>  	}, {
> -		.name		= "YUV 4:2:2 packed, CrYCbY",
>  		.fourcc		= V4L2_PIX_FMT_VYUY,
>  		.depth		= { 16 },
>  		.color		= FIMC_FMT_CRYCBY422,
> @@ -107,7 +98,6 @@ static struct fimc_fmt fimc_formats[] = {
>  		.mbus_code	= MEDIA_BUS_FMT_VYUY8_2X8,
>  		.flags		= FMT_FLAGS_M2M | FMT_FLAGS_CAM,
>  	}, {
> -		.name		= "YUV 4:2:2 packed, YCrYCb",
>  		.fourcc		= V4L2_PIX_FMT_YVYU,
>  		.depth		= { 16 },
>  		.color		= FIMC_FMT_YCRYCB422,
> @@ -116,7 +106,6 @@ static struct fimc_fmt fimc_formats[] = {
>  		.mbus_code	= MEDIA_BUS_FMT_YVYU8_2X8,
>  		.flags		= FMT_FLAGS_M2M | FMT_FLAGS_CAM,
>  	}, {
> -		.name		= "YUV 4:2:2 planar, Y/Cb/Cr",
>  		.fourcc		= V4L2_PIX_FMT_YUV422P,
>  		.depth		= { 16 },
>  		.color		= FIMC_FMT_YCBYCR422,
> @@ -124,7 +113,6 @@ static struct fimc_fmt fimc_formats[] = {
>  		.colplanes	= 3,
>  		.flags		= FMT_FLAGS_M2M,
>  	}, {
> -		.name		= "YUV 4:2:2 planar, Y/CbCr",
>  		.fourcc		= V4L2_PIX_FMT_NV16,
>  		.depth		= { 16 },
>  		.color		= FIMC_FMT_YCBYCR422,
> @@ -132,7 +120,6 @@ static struct fimc_fmt fimc_formats[] = {
>  		.colplanes	= 2,
>  		.flags		= FMT_FLAGS_M2M,
>  	}, {
> -		.name		= "YUV 4:2:2 planar, Y/CrCb",
>  		.fourcc		= V4L2_PIX_FMT_NV61,
>  		.depth		= { 16 },
>  		.color		= FIMC_FMT_YCRYCB422,
> @@ -140,7 +127,6 @@ static struct fimc_fmt fimc_formats[] = {
>  		.colplanes	= 2,
>  		.flags		= FMT_FLAGS_M2M,
>  	}, {
> -		.name		= "YUV 4:2:0 planar, YCbCr",
>  		.fourcc		= V4L2_PIX_FMT_YUV420,
>  		.depth		= { 12 },
>  		.color		= FIMC_FMT_YCBCR420,
> @@ -148,7 +134,6 @@ static struct fimc_fmt fimc_formats[] = {
>  		.colplanes	= 3,
>  		.flags		= FMT_FLAGS_M2M,
>  	}, {
> -		.name		= "YUV 4:2:0 planar, Y/CbCr",
>  		.fourcc		= V4L2_PIX_FMT_NV12,
>  		.depth		= { 12 },
>  		.color		= FIMC_FMT_YCBCR420,
> @@ -156,7 +141,6 @@ static struct fimc_fmt fimc_formats[] = {
>  		.colplanes	= 2,
>  		.flags		= FMT_FLAGS_M2M,
>  	}, {
> -		.name		= "YUV 4:2:0 non-contig. 2p, Y/CbCr",
>  		.fourcc		= V4L2_PIX_FMT_NV12M,
>  		.color		= FIMC_FMT_YCBCR420,
>  		.depth		= { 8, 4 },
> @@ -164,7 +148,6 @@ static struct fimc_fmt fimc_formats[] = {
>  		.colplanes	= 2,
>  		.flags		= FMT_FLAGS_M2M,
>  	}, {
> -		.name		= "YUV 4:2:0 non-contig. 3p, Y/Cb/Cr",
>  		.fourcc		= V4L2_PIX_FMT_YUV420M,
>  		.color		= FIMC_FMT_YCBCR420,
>  		.depth		= { 8, 2, 2 },
> @@ -172,7 +155,6 @@ static struct fimc_fmt fimc_formats[] = {
>  		.colplanes	= 3,
>  		.flags		= FMT_FLAGS_M2M,
>  	}, {
> -		.name		= "YUV 4:2:0 non-contig. 2p, tiled",
>  		.fourcc		= V4L2_PIX_FMT_NV12MT,
>  		.color		= FIMC_FMT_YCBCR420,
>  		.depth		= { 8, 4 },
> @@ -180,7 +162,6 @@ static struct fimc_fmt fimc_formats[] = {
>  		.colplanes	= 2,
>  		.flags		= FMT_FLAGS_M2M,
>  	}, {
> -		.name		= "JPEG encoded data",
>  		.fourcc		= V4L2_PIX_FMT_JPEG,
>  		.color		= FIMC_FMT_JPEG,
>  		.depth		= { 8 },
> @@ -189,7 +170,6 @@ static struct fimc_fmt fimc_formats[] = {
>  		.mbus_code	= MEDIA_BUS_FMT_JPEG_1X8,
>  		.flags		= FMT_FLAGS_CAM | FMT_FLAGS_COMPRESSED,
>  	}, {
> -		.name		= "S5C73MX interleaved UYVY/JPEG",
>  		.fourcc		= V4L2_PIX_FMT_S5C_UYVY_JPG,
>  		.color		= FIMC_FMT_YUYV_JPEG,
>  		.depth		= { 8 },
> diff --git a/drivers/media/platform/exynos4-is/fimc-isp-video.c b/drivers/media/platform/exynos4-is/fimc-isp-video.c
> index 2226a13ac89b..ec7a97e7582d 100644
> --- a/drivers/media/platform/exynos4-is/fimc-isp-video.c
> +++ b/drivers/media/platform/exynos4-is/fimc-isp-video.c
> @@ -365,7 +365,6 @@ static int isp_video_enum_fmt(struct file *file, void *priv,
>  	if (WARN_ON(fmt == NULL))
>  		return -EINVAL;
>  
> -	strscpy(f->description, fmt->name, sizeof(f->description));
>  	f->pixelformat = fmt->fourcc;
>  
>  	return 0;
> diff --git a/drivers/media/platform/exynos4-is/fimc-isp.c b/drivers/media/platform/exynos4-is/fimc-isp.c
> index 9a48c0f69320..dfb8285e4f0b 100644
> --- a/drivers/media/platform/exynos4-is/fimc-isp.c
> +++ b/drivers/media/platform/exynos4-is/fimc-isp.c
> @@ -36,21 +36,18 @@ module_param_named(debug_isp, fimc_isp_debug, int, S_IRUGO | S_IWUSR);
>  
>  static const struct fimc_fmt fimc_isp_formats[FIMC_ISP_NUM_FORMATS] = {
>  	{
> -		.name		= "RAW8 (GRBG)",
>  		.fourcc		= V4L2_PIX_FMT_SGRBG8,
>  		.depth		= { 8 },
>  		.color		= FIMC_FMT_RAW8,
>  		.memplanes	= 1,
>  		.mbus_code	= MEDIA_BUS_FMT_SGRBG8_1X8,
>  	}, {
> -		.name		= "RAW10 (GRBG)",
>  		.fourcc		= V4L2_PIX_FMT_SGRBG10,
>  		.depth		= { 10 },
>  		.color		= FIMC_FMT_RAW10,
>  		.memplanes	= 1,
>  		.mbus_code	= MEDIA_BUS_FMT_SGRBG10_1X10,
>  	}, {
> -		.name		= "RAW12 (GRBG)",
>  		.fourcc		= V4L2_PIX_FMT_SGRBG12,
>  		.depth		= { 12 },
>  		.color		= FIMC_FMT_RAW12,
> diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c
> index e71342756d88..91580b59e972 100644
> --- a/drivers/media/platform/exynos4-is/fimc-lite.c
> +++ b/drivers/media/platform/exynos4-is/fimc-lite.c
> @@ -42,7 +42,6 @@ module_param(debug, int, 0644);
>  
>  static const struct fimc_fmt fimc_lite_formats[] = {
>  	{
> -		.name		= "YUV 4:2:2 packed, YCbYCr",
>  		.fourcc		= V4L2_PIX_FMT_YUYV,
>  		.colorspace	= V4L2_COLORSPACE_JPEG,
>  		.depth		= { 16 },
> @@ -51,7 +50,6 @@ static const struct fimc_fmt fimc_lite_formats[] = {
>  		.mbus_code	= MEDIA_BUS_FMT_YUYV8_2X8,
>  		.flags		= FMT_FLAGS_YUV,
>  	}, {
> -		.name		= "YUV 4:2:2 packed, CbYCrY",
>  		.fourcc		= V4L2_PIX_FMT_UYVY,
>  		.colorspace	= V4L2_COLORSPACE_JPEG,
>  		.depth		= { 16 },
> @@ -60,7 +58,6 @@ static const struct fimc_fmt fimc_lite_formats[] = {
>  		.mbus_code	= MEDIA_BUS_FMT_UYVY8_2X8,
>  		.flags		= FMT_FLAGS_YUV,
>  	}, {
> -		.name		= "YUV 4:2:2 packed, CrYCbY",
>  		.fourcc		= V4L2_PIX_FMT_VYUY,
>  		.colorspace	= V4L2_COLORSPACE_JPEG,
>  		.depth		= { 16 },
> @@ -69,7 +66,6 @@ static const struct fimc_fmt fimc_lite_formats[] = {
>  		.mbus_code	= MEDIA_BUS_FMT_VYUY8_2X8,
>  		.flags		= FMT_FLAGS_YUV,
>  	}, {
> -		.name		= "YUV 4:2:2 packed, YCrYCb",
>  		.fourcc		= V4L2_PIX_FMT_YVYU,
>  		.colorspace	= V4L2_COLORSPACE_JPEG,
>  		.depth		= { 16 },
> @@ -78,7 +74,6 @@ static const struct fimc_fmt fimc_lite_formats[] = {
>  		.mbus_code	= MEDIA_BUS_FMT_YVYU8_2X8,
>  		.flags		= FMT_FLAGS_YUV,
>  	}, {
> -		.name		= "RAW8 (GRBG)",
>  		.fourcc		= V4L2_PIX_FMT_SGRBG8,
>  		.colorspace	= V4L2_COLORSPACE_SRGB,
>  		.depth		= { 8 },
> @@ -87,7 +82,6 @@ static const struct fimc_fmt fimc_lite_formats[] = {
>  		.mbus_code	= MEDIA_BUS_FMT_SGRBG8_1X8,
>  		.flags		= FMT_FLAGS_RAW_BAYER,
>  	}, {
> -		.name		= "RAW10 (GRBG)",
>  		.fourcc		= V4L2_PIX_FMT_SGRBG10,
>  		.colorspace	= V4L2_COLORSPACE_SRGB,
>  		.depth		= { 16 },
> @@ -96,7 +90,6 @@ static const struct fimc_fmt fimc_lite_formats[] = {
>  		.mbus_code	= MEDIA_BUS_FMT_SGRBG10_1X10,
>  		.flags		= FMT_FLAGS_RAW_BAYER,
>  	}, {
> -		.name		= "RAW12 (GRBG)",
>  		.fourcc		= V4L2_PIX_FMT_SGRBG12,
>  		.colorspace	= V4L2_COLORSPACE_SRGB,
>  		.depth		= { 16 },
> @@ -670,7 +663,6 @@ static int fimc_lite_enum_fmt(struct file *file, void *priv,
>  		return -EINVAL;
>  
>  	fmt = &fimc_lite_formats[f->index];
> -	strscpy(f->description, fmt->name, sizeof(f->description));
>  	f->pixelformat = fmt->fourcc;
>  
>  	return 0;
> diff --git a/drivers/media/platform/exynos4-is/fimc-m2m.c b/drivers/media/platform/exynos4-is/fimc-m2m.c
> index 62e876fc3555..c70c2cbe3eb1 100644
> --- a/drivers/media/platform/exynos4-is/fimc-m2m.c
> +++ b/drivers/media/platform/exynos4-is/fimc-m2m.c
> @@ -247,7 +247,6 @@ static int fimc_m2m_enum_fmt(struct file *file, void *priv,
>  	if (!fmt)
>  		return -EINVAL;
>  
> -	strscpy(f->description, fmt->name, sizeof(f->description));
>  	f->pixelformat = fmt->fourcc;
>  	return 0;
>  }
> diff --git a/drivers/media/platform/m2m-deinterlace.c b/drivers/media/platform/m2m-deinterlace.c
> index beb7fd7442fb..e9310eeec6cf 100644
> --- a/drivers/media/platform/m2m-deinterlace.c
> +++ b/drivers/media/platform/m2m-deinterlace.c
> @@ -37,7 +37,6 @@ module_param(debug, bool, 0644);
>  	v4l2_dbg(1, debug, &dev->v4l2_dev, "%s: " fmt, __func__, ## arg)
>  
>  struct deinterlace_fmt {
> -	char	*name;
>  	u32	fourcc;
>  	/* Types the format can be used for */
>  	u32	types;
> @@ -45,12 +44,10 @@ struct deinterlace_fmt {
>  
>  static struct deinterlace_fmt formats[] = {
>  	{
> -		.name	= "YUV 4:2:0 Planar",
>  		.fourcc	= V4L2_PIX_FMT_YUV420,
>  		.types	= MEM2MEM_CAPTURE | MEM2MEM_OUTPUT,
>  	},
>  	{
> -		.name	= "YUYV 4:2:2",
>  		.fourcc	= V4L2_PIX_FMT_YUYV,
>  		.types	= MEM2MEM_CAPTURE | MEM2MEM_OUTPUT,
>  	},
> @@ -470,7 +467,6 @@ static int enum_fmt(struct v4l2_fmtdesc *f, u32 type)
>  	if (i < NUM_FORMATS) {
>  		/* Format found */
>  		fmt = &formats[i];
> -		strscpy(f->description, fmt->name, sizeof(f->description));
>  		f->pixelformat = fmt->fourcc;
>  		return 0;
>  	}
> diff --git a/drivers/media/platform/marvell-ccic/mcam-core.c b/drivers/media/platform/marvell-ccic/mcam-core.c
> index dc30c48d4671..30ac454e702e 100644
> --- a/drivers/media/platform/marvell-ccic/mcam-core.c
> +++ b/drivers/media/platform/marvell-ccic/mcam-core.c
> @@ -98,56 +98,48 @@ MODULE_PARM_DESC(buffer_mode,
>  	container_of(notifier, struct mcam_camera, notifier)
>  
>  static struct mcam_format_struct {
> -	__u8 *desc;
>  	__u32 pixelformat;
>  	int bpp;   /* Bytes per pixel */
>  	bool planar;
>  	u32 mbus_code;
>  } mcam_formats[] = {
>  	{
> -		.desc		= "YUYV 4:2:2",
>  		.pixelformat	= V4L2_PIX_FMT_YUYV,
>  		.mbus_code	= MEDIA_BUS_FMT_YUYV8_2X8,
>  		.bpp		= 2,
>  		.planar		= false,
>  	},
>  	{
> -		.desc		= "YVYU 4:2:2",
>  		.pixelformat	= V4L2_PIX_FMT_YVYU,
>  		.mbus_code	= MEDIA_BUS_FMT_YUYV8_2X8,
>  		.bpp		= 2,
>  		.planar		= false,
>  	},
>  	{
> -		.desc		= "YUV 4:2:0 PLANAR",
>  		.pixelformat	= V4L2_PIX_FMT_YUV420,
>  		.mbus_code	= MEDIA_BUS_FMT_YUYV8_2X8,
>  		.bpp		= 1,
>  		.planar		= true,
>  	},
>  	{
> -		.desc		= "YVU 4:2:0 PLANAR",
>  		.pixelformat	= V4L2_PIX_FMT_YVU420,
>  		.mbus_code	= MEDIA_BUS_FMT_YUYV8_2X8,
>  		.bpp		= 1,
>  		.planar		= true,
>  	},
>  	{
> -		.desc		= "XRGB 444",
>  		.pixelformat	= V4L2_PIX_FMT_XRGB444,
>  		.mbus_code	= MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE,
>  		.bpp		= 2,
>  		.planar		= false,
>  	},
>  	{
> -		.desc		= "RGB 565",
>  		.pixelformat	= V4L2_PIX_FMT_RGB565,
>  		.mbus_code	= MEDIA_BUS_FMT_RGB565_2X8_LE,
>  		.bpp		= 2,
>  		.planar		= false,
>  	},
>  	{
> -		.desc		= "Raw RGB Bayer",
>  		.pixelformat	= V4L2_PIX_FMT_SBGGR8,
>  		.mbus_code	= MEDIA_BUS_FMT_SBGGR8_1X8,
>  		.bpp		= 1,
> @@ -1369,8 +1361,6 @@ static int mcam_vidioc_enum_fmt_vid_cap(struct file *filp,
>  {
>  	if (fmt->index >= N_MCAM_FMTS)
>  		return -EINVAL;
> -	strscpy(fmt->description, mcam_formats[fmt->index].desc,
> -		sizeof(fmt->description));
>  	fmt->pixelformat = mcam_formats[fmt->index].pixelformat;
>  	return 0;
>  }
> diff --git a/drivers/media/platform/mx2_emmaprp.c b/drivers/media/platform/mx2_emmaprp.c
> index 333324c75027..4d4225ab1589 100644
> --- a/drivers/media/platform/mx2_emmaprp.c
> +++ b/drivers/media/platform/mx2_emmaprp.c
> @@ -145,7 +145,6 @@ module_param(debug, bool, 0644);
>  #define PRP_INTR_ST_CH2OVF	(1 << 8)
>  
>  struct emmaprp_fmt {
> -	char	*name;
>  	u32	fourcc;
>  	/* Types the format can be used for */
>  	u32	types;
> @@ -153,12 +152,10 @@ struct emmaprp_fmt {
>  
>  static struct emmaprp_fmt formats[] = {
>  	{
> -		.name	= "YUV 4:2:0 Planar",
>  		.fourcc	= V4L2_PIX_FMT_YUV420,
>  		.types	= MEM2MEM_CAPTURE,
>  	},
>  	{
> -		.name	= "4:2:2, packed, YUYV",
>  		.fourcc	= V4L2_PIX_FMT_YUYV,
>  		.types	= MEM2MEM_OUTPUT,
>  	},
> @@ -409,7 +406,6 @@ static int enum_fmt(struct v4l2_fmtdesc *f, u32 type)
>  	if (i < NUM_FORMATS) {
>  		/* Format found */
>  		fmt = &formats[i];
> -		strscpy(f->description, fmt->name, sizeof(f->description) - 1);
>  		f->pixelformat = fmt->fourcc;
>  		return 0;
>  	}
> diff --git a/drivers/media/platform/omap/omap_vout.c b/drivers/media/platform/omap/omap_vout.c
> index cb6a9e3946b6..1f6742536c46 100644
> --- a/drivers/media/platform/omap/omap_vout.c
> +++ b/drivers/media/platform/omap/omap_vout.c
> @@ -114,14 +114,12 @@ static const struct v4l2_fmtdesc omap_formats[] = {
>  		 *      Byte 0                    Byte 1
>  		 *      g2 g1 g0 b4 b3 b2 b1 b0   r4 r3 r2 r1 r0 g5 g4 g3
>  		 */
> -		.description = "RGB565, le",
>  		.pixelformat = V4L2_PIX_FMT_RGB565,
>  	},
>  	{
>  		/* Note:  V4L2 defines RGB32 as: RGB-8-8-8-8  we use
>  		 *  this for RGB24 unpack mode, the last 8 bits are ignored
>  		 * */
> -		.description = "RGB32, le",
>  		.pixelformat = V4L2_PIX_FMT_RGB32,
>  	},
>  	{
> @@ -129,15 +127,12 @@ static const struct v4l2_fmtdesc omap_formats[] = {
>  		 *        this for RGB24 packed mode
>  		 *
>  		 */
> -		.description = "RGB24, le",
>  		.pixelformat = V4L2_PIX_FMT_RGB24,
>  	},
>  	{
> -		.description = "YUYV (YUV 4:2:2), packed",
>  		.pixelformat = V4L2_PIX_FMT_YUYV,
>  	},
>  	{
> -		.description = "UYVY, packed",
>  		.pixelformat = V4L2_PIX_FMT_UYVY,
>  	},
>  };
> @@ -1060,8 +1055,6 @@ static int vidioc_enum_fmt_vid_out(struct file *file, void *fh,
>  		return -EINVAL;
>  
>  	fmt->flags = omap_formats[index].flags;
> -	strscpy(fmt->description, omap_formats[index].description,
> -		sizeof(fmt->description));
>  	fmt->pixelformat = omap_formats[index].pixelformat;
>  
>  	return 0;
> diff --git a/drivers/media/platform/s3c-camif/camif-capture.c b/drivers/media/platform/s3c-camif/camif-capture.c
> index c3fc94ef251e..93813d593a1d 100644
> --- a/drivers/media/platform/s3c-camif/camif-capture.c
> +++ b/drivers/media/platform/s3c-camif/camif-capture.c
> @@ -688,10 +688,7 @@ static int s3c_camif_vidioc_enum_fmt(struct file *file, void *priv,
>  	if (!fmt)
>  		return -EINVAL;
>  
> -	strscpy(f->description, fmt->name, sizeof(f->description));
>  	f->pixelformat = fmt->fourcc;
> -
> -	pr_debug("fmt(%d): %s\n", f->index, f->description);
>  	return 0;
>  }
>  
> @@ -805,10 +802,10 @@ static int s3c_camif_vidioc_s_fmt(struct file *file, void *priv,
>  	if (vp->owner == NULL)
>  		vp->owner = priv;
>  
> -	pr_debug("%ux%u. payload: %u. fmt: %s. %d %d. sizeimage: %d. bpl: %d\n",
> -		out_frame->f_width, out_frame->f_height, vp->payload, fmt->name,
> -		pix->width * pix->height * fmt->depth, fmt->depth,
> -		pix->sizeimage, pix->bytesperline);
> +	pr_debug("%ux%u. payload: %u. fmt: 0x%08x. %d %d. sizeimage: %d. bpl: %d\n",
> +		 out_frame->f_width, out_frame->f_height, vp->payload,
> +		 fmt->fourcc, pix->width * pix->height * fmt->depth,
> +		 fmt->depth, pix->sizeimage, pix->bytesperline);
>  
>  	return 0;
>  }
> diff --git a/drivers/media/platform/s3c-camif/camif-core.c b/drivers/media/platform/s3c-camif/camif-core.c
> index b05ce0149ca1..f0acd6edcbba 100644
> --- a/drivers/media/platform/s3c-camif/camif-core.c
> +++ b/drivers/media/platform/s3c-camif/camif-core.c
> @@ -42,7 +42,6 @@ static char *camif_clocks[CLK_MAX_NUM] = {
>  
>  static const struct camif_fmt camif_formats[] = {
>  	{
> -		.name		= "YUV 4:2:2 planar, Y/Cb/Cr",
>  		.fourcc		= V4L2_PIX_FMT_YUV422P,
>  		.depth		= 16,
>  		.ybpp		= 1,
> @@ -51,7 +50,6 @@ static const struct camif_fmt camif_formats[] = {
>  		.flags		= FMT_FL_S3C24XX_CODEC |
>  				  FMT_FL_S3C64XX,
>  	}, {
> -		.name		= "YUV 4:2:0 planar, Y/Cb/Cr",
>  		.fourcc		= V4L2_PIX_FMT_YUV420,
>  		.depth		= 12,
>  		.ybpp		= 1,
> @@ -60,7 +58,6 @@ static const struct camif_fmt camif_formats[] = {
>  		.flags		= FMT_FL_S3C24XX_CODEC |
>  				  FMT_FL_S3C64XX,
>  	}, {
> -		.name		= "YVU 4:2:0 planar, Y/Cr/Cb",
>  		.fourcc		= V4L2_PIX_FMT_YVU420,
>  		.depth		= 12,
>  		.ybpp		= 1,
> @@ -69,7 +66,6 @@ static const struct camif_fmt camif_formats[] = {
>  		.flags		= FMT_FL_S3C24XX_CODEC |
>  				  FMT_FL_S3C64XX,
>  	}, {
> -		.name		= "RGB565, 16 bpp",
>  		.fourcc		= V4L2_PIX_FMT_RGB565X,
>  		.depth		= 16,
>  		.ybpp		= 2,
> @@ -78,7 +74,6 @@ static const struct camif_fmt camif_formats[] = {
>  		.flags		= FMT_FL_S3C24XX_PREVIEW |
>  				  FMT_FL_S3C64XX,
>  	}, {
> -		.name		= "XRGB8888, 32 bpp",
>  		.fourcc		= V4L2_PIX_FMT_RGB32,
>  		.depth		= 32,
>  		.ybpp		= 4,
> @@ -87,7 +82,6 @@ static const struct camif_fmt camif_formats[] = {
>  		.flags		= FMT_FL_S3C24XX_PREVIEW |
>  				  FMT_FL_S3C64XX,
>  	}, {
> -		.name		= "BGR666",
>  		.fourcc		= V4L2_PIX_FMT_BGR666,
>  		.depth		= 32,
>  		.ybpp		= 4,
> diff --git a/drivers/media/platform/s3c-camif/camif-core.h b/drivers/media/platform/s3c-camif/camif-core.h
> index be5e7357dffc..b3e7ddd313f2 100644
> --- a/drivers/media/platform/s3c-camif/camif-core.h
> +++ b/drivers/media/platform/s3c-camif/camif-core.h
> @@ -92,7 +92,6 @@ enum img_fmt {
>   * @ybpp:      number of luminance bytes per pixel
>   */
>  struct camif_fmt {
> -	char *name;
>  	u32 fourcc;
>  	u32 color;
>  	u16 colplanes;
> diff --git a/drivers/media/platform/s5p-g2d/g2d.c b/drivers/media/platform/s5p-g2d/g2d.c
> index 152d192d5c3f..0c41bfcace7b 100644
> --- a/drivers/media/platform/s5p-g2d/g2d.c
> +++ b/drivers/media/platform/s5p-g2d/g2d.c
> @@ -29,31 +29,26 @@
>  
>  static struct g2d_fmt formats[] = {
>  	{
> -		.name	= "XRGB_8888",
>  		.fourcc	= V4L2_PIX_FMT_RGB32,
>  		.depth	= 32,
>  		.hw	= COLOR_MODE(ORDER_XRGB, MODE_XRGB_8888),
>  	},
>  	{
> -		.name	= "RGB_565",
>  		.fourcc	= V4L2_PIX_FMT_RGB565X,
>  		.depth	= 16,
>  		.hw	= COLOR_MODE(ORDER_XRGB, MODE_RGB_565),
>  	},
>  	{
> -		.name	= "XRGB_1555",
>  		.fourcc	= V4L2_PIX_FMT_RGB555X,
>  		.depth	= 16,
>  		.hw	= COLOR_MODE(ORDER_XRGB, MODE_XRGB_1555),
>  	},
>  	{
> -		.name	= "XRGB_4444",
>  		.fourcc	= V4L2_PIX_FMT_RGB444,
>  		.depth	= 16,
>  		.hw	= COLOR_MODE(ORDER_XRGB, MODE_XRGB_4444),
>  	},
>  	{
> -		.name	= "PACKED_RGB_888",
>  		.fourcc	= V4L2_PIX_FMT_RGB24,
>  		.depth	= 24,
>  		.hw	= COLOR_MODE(ORDER_XRGB, MODE_PACKED_RGB_888),
> @@ -308,7 +303,6 @@ static int vidioc_enum_fmt(struct file *file, void *prv, struct v4l2_fmtdesc *f)
>  		return -EINVAL;
>  	fmt = &formats[f->index];
>  	f->pixelformat = fmt->fourcc;
> -	strscpy(f->description, fmt->name, sizeof(f->description));

This could be simplified to

	f->pixelfromat = formats[f->index].fourcc;

and the local fmt variable could be removed.

>  	return 0;
>  }
>  
> diff --git a/drivers/media/platform/s5p-g2d/g2d.h b/drivers/media/platform/s5p-g2d/g2d.h
> index def0ec0dabeb..c2309c1370da 100644
> --- a/drivers/media/platform/s5p-g2d/g2d.h
> +++ b/drivers/media/platform/s5p-g2d/g2d.h
> @@ -61,7 +61,6 @@ struct g2d_ctx {
>  };
>  
>  struct g2d_fmt {
> -	char	*name;
>  	u32	fourcc;
>  	int	depth;
>  	u32	hw;
> diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c
> index 8cc730eccb6c..8b9f0cfd6c9d 100644
> --- a/drivers/media/platform/s5p-jpeg/jpeg-core.c
> +++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c
> @@ -38,7 +38,6 @@
>  
>  static struct s5p_jpeg_fmt sjpeg_formats[] = {
>  	{
> -		.name		= "JPEG JFIF",
>  		.fourcc		= V4L2_PIX_FMT_JPEG,
>  		.flags		= SJPEG_FMT_FLAG_ENC_CAPTURE |
>  				  SJPEG_FMT_FLAG_DEC_OUTPUT |
> @@ -47,7 +46,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>  				  SJPEG_FMT_FLAG_EXYNOS4,
>  	},
>  	{
> -		.name		= "YUV 4:2:2 packed, YCbYCr",
>  		.fourcc		= V4L2_PIX_FMT_YUYV,
>  		.depth		= 16,
>  		.colplanes	= 1,
> @@ -60,7 +58,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>  		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_422,
>  	},
>  	{
> -		.name		= "YUV 4:2:2 packed, YCbYCr",
>  		.fourcc		= V4L2_PIX_FMT_YUYV,
>  		.depth		= 16,
>  		.colplanes	= 1,
> @@ -73,7 +70,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>  		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_422,
>  	},
>  	{
> -		.name		= "YUV 4:2:2 packed, YCbYCr",
>  		.fourcc		= V4L2_PIX_FMT_YUYV,
>  		.depth		= 16,
>  		.colplanes	= 1,
> @@ -86,7 +82,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>  		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_422,
>  	},
>  	{
> -		.name		= "YUV 4:2:2 packed, YCrYCb",
>  		.fourcc		= V4L2_PIX_FMT_YVYU,
>  		.depth		= 16,
>  		.colplanes	= 1,
> @@ -99,7 +94,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>  		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_422,
>  	},
>  	{
> -		.name		= "YUV 4:2:2 packed, YCrYCb",
>  		.fourcc		= V4L2_PIX_FMT_YVYU,
>  		.depth		= 16,
>  		.colplanes	= 1,
> @@ -112,7 +106,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>  		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_422,
>  	},
>  	{
> -		.name		= "YUV 4:2:2 packed, YCrYCb",
>  		.fourcc		= V4L2_PIX_FMT_UYVY,
>  		.depth		= 16,
>  		.colplanes	= 1,
> @@ -125,7 +118,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>  		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_422,
>  	},
>  	{
> -		.name		= "YUV 4:2:2 packed, YCrYCb",
>  		.fourcc		= V4L2_PIX_FMT_VYUY,
>  		.depth		= 16,
>  		.colplanes	= 1,
> @@ -138,7 +130,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>  		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_422,
>  	},
>  	{
> -		.name		= "RGB565",
>  		.fourcc		= V4L2_PIX_FMT_RGB565,
>  		.depth		= 16,
>  		.colplanes	= 1,
> @@ -151,7 +142,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>  		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_444,
>  	},
>  	{
> -		.name		= "RGB565",
>  		.fourcc		= V4L2_PIX_FMT_RGB565,
>  		.depth		= 16,
>  		.colplanes	= 1,
> @@ -164,7 +154,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>  		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_444,
>  	},
>  	{
> -		.name		= "RGB565X",
>  		.fourcc		= V4L2_PIX_FMT_RGB565X,
>  		.depth		= 16,
>  		.colplanes	= 1,
> @@ -177,7 +166,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>  		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_444,
>  	},
>  	{
> -		.name		= "RGB565",
>  		.fourcc		= V4L2_PIX_FMT_RGB565,
>  		.depth		= 16,
>  		.colplanes	= 1,
> @@ -189,7 +177,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>  		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_444,
>  	},
>  	{
> -		.name		= "ARGB8888, 32 bpp",
>  		.fourcc		= V4L2_PIX_FMT_RGB32,
>  		.depth		= 32,
>  		.colplanes	= 1,
> @@ -202,7 +189,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>  		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_444,
>  	},
>  	{
> -		.name		= "ARGB8888, 32 bpp",
>  		.fourcc		= V4L2_PIX_FMT_RGB32,
>  		.depth		= 32,
>  		.colplanes	= 1,
> @@ -215,7 +201,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>  		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_444,
>  	},
>  	{
> -		.name		= "YUV 4:4:4 planar, Y/CbCr",
>  		.fourcc		= V4L2_PIX_FMT_NV24,
>  		.depth		= 24,
>  		.colplanes	= 2,
> @@ -228,7 +213,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>  		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_444,
>  	},
>  	{
> -		.name		= "YUV 4:4:4 planar, Y/CrCb",
>  		.fourcc		= V4L2_PIX_FMT_NV42,
>  		.depth		= 24,
>  		.colplanes	= 2,
> @@ -241,7 +225,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>  		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_444,
>  	},
>  	{
> -		.name		= "YUV 4:2:2 planar, Y/CrCb",
>  		.fourcc		= V4L2_PIX_FMT_NV61,
>  		.depth		= 16,
>  		.colplanes	= 2,
> @@ -254,7 +237,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>  		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_422,
>  	},
>  	{
> -		.name		= "YUV 4:2:2 planar, Y/CbCr",
>  		.fourcc		= V4L2_PIX_FMT_NV16,
>  		.depth		= 16,
>  		.colplanes	= 2,
> @@ -267,7 +249,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>  		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_422,
>  	},
>  	{
> -		.name		= "YUV 4:2:0 planar, Y/CbCr",
>  		.fourcc		= V4L2_PIX_FMT_NV12,
>  		.depth		= 12,
>  		.colplanes	= 2,
> @@ -280,7 +261,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>  		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_420,
>  	},
>  	{
> -		.name		= "YUV 4:2:0 planar, Y/CbCr",
>  		.fourcc		= V4L2_PIX_FMT_NV12,
>  		.depth		= 12,
>  		.colplanes	= 2,
> @@ -293,7 +273,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>  		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_420,
>  	},
>  	{
> -		.name		= "YUV 4:2:0 planar, Y/CbCr",
>  		.fourcc		= V4L2_PIX_FMT_NV12,
>  		.depth		= 12,
>  		.colplanes	= 2,
> @@ -306,7 +285,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>  		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_420,
>  	},
>  	{
> -		.name		= "YUV 4:2:0 planar, Y/CrCb",
>  		.fourcc		= V4L2_PIX_FMT_NV21,
>  		.depth		= 12,
>  		.colplanes	= 2,
> @@ -319,7 +297,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>  		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_420,
>  	},
>  	{
> -		.name		= "YUV 4:2:0 planar, Y/CrCb",
>  		.fourcc		= V4L2_PIX_FMT_NV21,
>  		.depth		= 12,
>  		.colplanes	= 2,
> @@ -333,7 +310,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>  		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_420,
>  	},
>  	{
> -		.name		= "YUV 4:2:0 contiguous 3-planar, Y/Cb/Cr",
>  		.fourcc		= V4L2_PIX_FMT_YUV420,
>  		.depth		= 12,
>  		.colplanes	= 3,
> @@ -346,7 +322,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>  		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_420,
>  	},
>  	{
> -		.name		= "YUV 4:2:0 contiguous 3-planar, Y/Cb/Cr",
>  		.fourcc		= V4L2_PIX_FMT_YUV420,
>  		.depth		= 12,
>  		.colplanes	= 3,
> @@ -359,7 +334,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>  		.subsampling	= V4L2_JPEG_CHROMA_SUBSAMPLING_420,
>  	},
>  	{
> -		.name		= "Gray",
>  		.fourcc		= V4L2_PIX_FMT_GREY,
>  		.depth		= 8,
>  		.colplanes	= 1,
> @@ -1317,7 +1291,6 @@ static int enum_fmt(struct s5p_jpeg_ctx *ctx,
>  	if (i >= n)
>  		return -EINVAL;
>  
> -	strscpy(f->description, sjpeg_formats[i].name, sizeof(f->description));
>  	f->pixelformat = sjpeg_formats[i].fourcc;
>  
>  	return 0;
> diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.h b/drivers/media/platform/s5p-jpeg/jpeg-core.h
> index 144c102ff05f..7fabe743e6dd 100644
> --- a/drivers/media/platform/s5p-jpeg/jpeg-core.h
> +++ b/drivers/media/platform/s5p-jpeg/jpeg-core.h
> @@ -153,7 +153,6 @@ struct s5p_jpeg_variant {
>  
>  /**
>   * struct jpeg_fmt - driver's internal color format data
> - * @name:	format description
>   * @fourcc:	the fourcc code, 0 if not applicable
>   * @depth:	number of bits per pixel
>   * @colplanes:	number of color planes (1 for packed formats)
> @@ -162,7 +161,6 @@ struct s5p_jpeg_variant {
>   * @flags:	flags describing format applicability
>   */
>  struct s5p_jpeg_fmt {
> -	char	*name;
>  	u32	fourcc;
>  	int	depth;
>  	int	colplanes;
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> index 5dc086516360..96d1ecd1521b 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> @@ -718,7 +718,6 @@ struct s5p_mfc_ctx {
>   *			used by the MFC
>   */
>  struct s5p_mfc_fmt {
> -	char *name;
>  	u32 fourcc;
>  	u32 codec_mode;
>  	enum s5p_mfc_fmt_type type;
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> index 4017c8b471f4..e7f186f90894 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> @@ -29,7 +29,6 @@
>  
>  static struct s5p_mfc_fmt formats[] = {
>  	{
> -		.name		= "4:2:0 2 Planes 16x16 Tiles",
>  		.fourcc		= V4L2_PIX_FMT_NV12MT_16X16,
>  		.codec_mode	= S5P_MFC_CODEC_NONE,
>  		.type		= MFC_FMT_RAW,
> @@ -37,7 +36,6 @@ static struct s5p_mfc_fmt formats[] = {
>  		.versions	= MFC_V6_BIT | MFC_V7_BIT,
>  	},
>  	{
> -		.name		= "4:2:0 2 Planes 64x32 Tiles",
>  		.fourcc		= V4L2_PIX_FMT_NV12MT,
>  		.codec_mode	= S5P_MFC_CODEC_NONE,
>  		.type		= MFC_FMT_RAW,
> @@ -45,7 +43,6 @@ static struct s5p_mfc_fmt formats[] = {
>  		.versions	= MFC_V5_BIT,
>  	},
>  	{
> -		.name		= "4:2:0 2 Planes Y/CbCr",
>  		.fourcc		= V4L2_PIX_FMT_NV12M,
>  		.codec_mode	= S5P_MFC_CODEC_NONE,
>  		.type		= MFC_FMT_RAW,
> @@ -53,7 +50,6 @@ static struct s5p_mfc_fmt formats[] = {
>  		.versions	= MFC_V6PLUS_BITS,
>  	},
>  	{
> -		.name		= "4:2:0 2 Planes Y/CrCb",
>  		.fourcc		= V4L2_PIX_FMT_NV21M,
>  		.codec_mode	= S5P_MFC_CODEC_NONE,
>  		.type		= MFC_FMT_RAW,
> @@ -61,7 +57,6 @@ static struct s5p_mfc_fmt formats[] = {
>  		.versions	= MFC_V6PLUS_BITS,
>  	},
>  	{
> -		.name		= "H264 Encoded Stream",
>  		.fourcc		= V4L2_PIX_FMT_H264,
>  		.codec_mode	= S5P_MFC_CODEC_H264_DEC,
>  		.type		= MFC_FMT_DEC,
> @@ -69,7 +64,6 @@ static struct s5p_mfc_fmt formats[] = {
>  		.versions	= MFC_V5PLUS_BITS,
>  	},
>  	{
> -		.name		= "H264/MVC Encoded Stream",
>  		.fourcc		= V4L2_PIX_FMT_H264_MVC,
>  		.codec_mode	= S5P_MFC_CODEC_H264_MVC_DEC,
>  		.type		= MFC_FMT_DEC,
> @@ -77,7 +71,6 @@ static struct s5p_mfc_fmt formats[] = {
>  		.versions	= MFC_V6PLUS_BITS,
>  	},
>  	{
> -		.name		= "H263 Encoded Stream",
>  		.fourcc		= V4L2_PIX_FMT_H263,
>  		.codec_mode	= S5P_MFC_CODEC_H263_DEC,
>  		.type		= MFC_FMT_DEC,
> @@ -85,7 +78,6 @@ static struct s5p_mfc_fmt formats[] = {
>  		.versions	= MFC_V5PLUS_BITS,
>  	},
>  	{
> -		.name		= "MPEG1 Encoded Stream",
>  		.fourcc		= V4L2_PIX_FMT_MPEG1,
>  		.codec_mode	= S5P_MFC_CODEC_MPEG2_DEC,
>  		.type		= MFC_FMT_DEC,
> @@ -93,7 +85,6 @@ static struct s5p_mfc_fmt formats[] = {
>  		.versions	= MFC_V5PLUS_BITS,
>  	},
>  	{
> -		.name		= "MPEG2 Encoded Stream",
>  		.fourcc		= V4L2_PIX_FMT_MPEG2,
>  		.codec_mode	= S5P_MFC_CODEC_MPEG2_DEC,
>  		.type		= MFC_FMT_DEC,
> @@ -101,7 +92,6 @@ static struct s5p_mfc_fmt formats[] = {
>  		.versions	= MFC_V5PLUS_BITS,
>  	},
>  	{
> -		.name		= "MPEG4 Encoded Stream",
>  		.fourcc		= V4L2_PIX_FMT_MPEG4,
>  		.codec_mode	= S5P_MFC_CODEC_MPEG4_DEC,
>  		.type		= MFC_FMT_DEC,
> @@ -109,7 +99,6 @@ static struct s5p_mfc_fmt formats[] = {
>  		.versions	= MFC_V5PLUS_BITS,
>  	},
>  	{
> -		.name		= "XviD Encoded Stream",
>  		.fourcc		= V4L2_PIX_FMT_XVID,
>  		.codec_mode	= S5P_MFC_CODEC_MPEG4_DEC,
>  		.type		= MFC_FMT_DEC,
> @@ -117,7 +106,6 @@ static struct s5p_mfc_fmt formats[] = {
>  		.versions	= MFC_V5PLUS_BITS,
>  	},
>  	{
> -		.name		= "VC1 Encoded Stream",
>  		.fourcc		= V4L2_PIX_FMT_VC1_ANNEX_G,
>  		.codec_mode	= S5P_MFC_CODEC_VC1_DEC,
>  		.type		= MFC_FMT_DEC,
> @@ -125,7 +113,6 @@ static struct s5p_mfc_fmt formats[] = {
>  		.versions	= MFC_V5PLUS_BITS,
>  	},
>  	{
> -		.name		= "VC1 RCV Encoded Stream",
>  		.fourcc		= V4L2_PIX_FMT_VC1_ANNEX_L,
>  		.codec_mode	= S5P_MFC_CODEC_VC1RCV_DEC,
>  		.type		= MFC_FMT_DEC,
> @@ -133,7 +120,6 @@ static struct s5p_mfc_fmt formats[] = {
>  		.versions	= MFC_V5PLUS_BITS,
>  	},
>  	{
> -		.name		= "VP8 Encoded Stream",
>  		.fourcc		= V4L2_PIX_FMT_VP8,
>  		.codec_mode	= S5P_MFC_CODEC_VP8_DEC,
>  		.type		= MFC_FMT_DEC,
> @@ -297,7 +283,6 @@ static int vidioc_enum_fmt(struct file *file, struct v4l2_fmtdesc *f,
>  	if (i == ARRAY_SIZE(formats))
>  		return -EINVAL;
>  	fmt = &formats[i];
> -	strscpy(f->description, fmt->name, sizeof(f->description));
>  	f->pixelformat = fmt->fourcc;

This could be simplified to

	f->pixelformat = formats[i].fourcc;

and the local fmt variable could be removed.

>  	return 0;
>  }
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
> index 97e76480e942..d33c03b0a1d4 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
> @@ -32,7 +32,6 @@
>  
>  static struct s5p_mfc_fmt formats[] = {
>  	{
> -		.name		= "4:2:0 2 Planes 16x16 Tiles",
>  		.fourcc		= V4L2_PIX_FMT_NV12MT_16X16,
>  		.codec_mode	= S5P_MFC_CODEC_NONE,
>  		.type		= MFC_FMT_RAW,
> @@ -40,7 +39,6 @@ static struct s5p_mfc_fmt formats[] = {
>  		.versions	= MFC_V6_BIT | MFC_V7_BIT,
>  	},
>  	{
> -		.name		= "4:2:0 2 Planes 64x32 Tiles",
>  		.fourcc		= V4L2_PIX_FMT_NV12MT,
>  		.codec_mode	= S5P_MFC_CODEC_NONE,
>  		.type		= MFC_FMT_RAW,
> @@ -48,7 +46,6 @@ static struct s5p_mfc_fmt formats[] = {
>  		.versions	= MFC_V5_BIT,
>  	},
>  	{
> -		.name		= "4:2:0 2 Planes Y/CbCr",
>  		.fourcc		= V4L2_PIX_FMT_NV12M,
>  		.codec_mode	= S5P_MFC_CODEC_NONE,
>  		.type		= MFC_FMT_RAW,
> @@ -56,7 +53,6 @@ static struct s5p_mfc_fmt formats[] = {
>  		.versions	= MFC_V5PLUS_BITS,
>  	},
>  	{
> -		.name		= "4:2:0 2 Planes Y/CrCb",
>  		.fourcc		= V4L2_PIX_FMT_NV21M,
>  		.codec_mode	= S5P_MFC_CODEC_NONE,
>  		.type		= MFC_FMT_RAW,
> @@ -64,7 +60,6 @@ static struct s5p_mfc_fmt formats[] = {
>  		.versions	= MFC_V6PLUS_BITS,
>  	},
>  	{
> -		.name		= "H264 Encoded Stream",
>  		.fourcc		= V4L2_PIX_FMT_H264,
>  		.codec_mode	= S5P_MFC_CODEC_H264_ENC,
>  		.type		= MFC_FMT_ENC,
> @@ -72,7 +67,6 @@ static struct s5p_mfc_fmt formats[] = {
>  		.versions	= MFC_V5PLUS_BITS,
>  	},
>  	{
> -		.name		= "MPEG4 Encoded Stream",
>  		.fourcc		= V4L2_PIX_FMT_MPEG4,
>  		.codec_mode	= S5P_MFC_CODEC_MPEG4_ENC,
>  		.type		= MFC_FMT_ENC,
> @@ -80,7 +74,6 @@ static struct s5p_mfc_fmt formats[] = {
>  		.versions	= MFC_V5PLUS_BITS,
>  	},
>  	{
> -		.name		= "H263 Encoded Stream",
>  		.fourcc		= V4L2_PIX_FMT_H263,
>  		.codec_mode	= S5P_MFC_CODEC_H263_ENC,
>  		.type		= MFC_FMT_ENC,
> @@ -88,7 +81,6 @@ static struct s5p_mfc_fmt formats[] = {
>  		.versions	= MFC_V5PLUS_BITS,
>  	},
>  	{
> -		.name		= "VP8 Encoded Stream",
>  		.fourcc		= V4L2_PIX_FMT_VP8,
>  		.codec_mode	= S5P_MFC_CODEC_VP8_ENC,
>  		.type		= MFC_FMT_ENC,
> @@ -1333,8 +1325,6 @@ static int vidioc_enum_fmt(struct file *file, struct v4l2_fmtdesc *f,
>  
>  		if (j == f->index) {
>  			fmt = &formats[i];
> -			strscpy(f->description, fmt->name,
> -				sizeof(f->description));
>  			f->pixelformat = fmt->fourcc;

Same here.

With these small issues addressed,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>  			return 0;
>  		}
> diff --git a/drivers/media/platform/sh_veu.c b/drivers/media/platform/sh_veu.c
> index 5a9ba05c996e..26360af2325e 100644
> --- a/drivers/media/platform/sh_veu.c
> +++ b/drivers/media/platform/sh_veu.c
> @@ -86,7 +86,6 @@ struct sh_veu_file {
>  };
>  
>  struct sh_veu_format {
> -	char *name;
>  	u32 fourcc;
>  	unsigned int depth;
>  	unsigned int ydepth;
> @@ -144,14 +143,14 @@ enum sh_veu_fmt_idx {
>   * aligned for NV24.
>   */
>  static const struct sh_veu_format sh_veu_fmt[] = {
> -	[SH_VEU_FMT_NV12]   = { .ydepth = 8, .depth = 12, .name = "NV12", .fourcc = V4L2_PIX_FMT_NV12 },
> -	[SH_VEU_FMT_NV16]   = { .ydepth = 8, .depth = 16, .name = "NV16", .fourcc = V4L2_PIX_FMT_NV16 },
> -	[SH_VEU_FMT_NV24]   = { .ydepth = 8, .depth = 24, .name = "NV24", .fourcc = V4L2_PIX_FMT_NV24 },
> -	[SH_VEU_FMT_RGB332] = { .ydepth = 8, .depth = 8, .name = "RGB332", .fourcc = V4L2_PIX_FMT_RGB332 },
> -	[SH_VEU_FMT_RGB444] = { .ydepth = 16, .depth = 16, .name = "RGB444", .fourcc = V4L2_PIX_FMT_RGB444 },
> -	[SH_VEU_FMT_RGB565] = { .ydepth = 16, .depth = 16, .name = "RGB565", .fourcc = V4L2_PIX_FMT_RGB565 },
> -	[SH_VEU_FMT_RGB666] = { .ydepth = 32, .depth = 32, .name = "BGR666", .fourcc = V4L2_PIX_FMT_BGR666 },
> -	[SH_VEU_FMT_RGB24]  = { .ydepth = 24, .depth = 24, .name = "RGB24", .fourcc = V4L2_PIX_FMT_RGB24 },
> +	[SH_VEU_FMT_NV12]   = { .ydepth = 8, .depth = 12, .fourcc = V4L2_PIX_FMT_NV12 },
> +	[SH_VEU_FMT_NV16]   = { .ydepth = 8, .depth = 16, .fourcc = V4L2_PIX_FMT_NV16 },
> +	[SH_VEU_FMT_NV24]   = { .ydepth = 8, .depth = 24, .fourcc = V4L2_PIX_FMT_NV24 },
> +	[SH_VEU_FMT_RGB332] = { .ydepth = 8, .depth = 8, .fourcc = V4L2_PIX_FMT_RGB332 },
> +	[SH_VEU_FMT_RGB444] = { .ydepth = 16, .depth = 16, .fourcc = V4L2_PIX_FMT_RGB444 },
> +	[SH_VEU_FMT_RGB565] = { .ydepth = 16, .depth = 16, .fourcc = V4L2_PIX_FMT_RGB565 },
> +	[SH_VEU_FMT_RGB666] = { .ydepth = 32, .depth = 32, .fourcc = V4L2_PIX_FMT_BGR666 },
> +	[SH_VEU_FMT_RGB24]  = { .ydepth = 24, .depth = 24, .fourcc = V4L2_PIX_FMT_RGB24 },
>  };
>  
>  #define DEFAULT_IN_VFMT (struct sh_veu_vfmt){						\
> @@ -359,8 +358,6 @@ static int sh_veu_enum_fmt(struct v4l2_fmtdesc *f, const int *fmt, int fmt_num)
>  	if (f->index >= fmt_num)
>  		return -EINVAL;
>  
> -	strscpy(f->description, sh_veu_fmt[fmt[f->index]].name,
> -		sizeof(f->description));
>  	f->pixelformat = sh_veu_fmt[fmt[f->index]].fourcc;
>  	return 0;
>  }
> diff --git a/drivers/media/platform/sh_vou.c b/drivers/media/platform/sh_vou.c
> index 5799aa4b9323..4fc1b4e11b70 100644
> --- a/drivers/media/platform/sh_vou.c
> +++ b/drivers/media/platform/sh_vou.c
> @@ -138,7 +138,6 @@ static void sh_vou_reg_ab_set(struct sh_vou_device *vou_dev, unsigned int reg,
>  
>  struct sh_vou_fmt {
>  	u32		pfmt;
> -	char		*desc;
>  	unsigned char	bpp;
>  	unsigned char	bpl;
>  	unsigned char	rgb;
> @@ -152,7 +151,6 @@ static struct sh_vou_fmt vou_fmt[] = {
>  		.pfmt	= V4L2_PIX_FMT_NV12,
>  		.bpp	= 12,
>  		.bpl	= 1,
> -		.desc	= "YVU420 planar",
>  		.yf	= 0,
>  		.rgb	= 0,
>  	},
> @@ -160,7 +158,6 @@ static struct sh_vou_fmt vou_fmt[] = {
>  		.pfmt	= V4L2_PIX_FMT_NV16,
>  		.bpp	= 16,
>  		.bpl	= 1,
> -		.desc	= "YVYU planar",
>  		.yf	= 1,
>  		.rgb	= 0,
>  	},
> @@ -168,7 +165,6 @@ static struct sh_vou_fmt vou_fmt[] = {
>  		.pfmt	= V4L2_PIX_FMT_RGB24,
>  		.bpp	= 24,
>  		.bpl	= 3,
> -		.desc	= "RGB24",
>  		.pkf	= 2,
>  		.rgb	= 1,
>  	},
> @@ -176,7 +172,6 @@ static struct sh_vou_fmt vou_fmt[] = {
>  		.pfmt	= V4L2_PIX_FMT_RGB565,
>  		.bpp	= 16,
>  		.bpl	= 2,
> -		.desc	= "RGB565",
>  		.pkf	= 3,
>  		.rgb	= 1,
>  	},
> @@ -184,7 +179,6 @@ static struct sh_vou_fmt vou_fmt[] = {
>  		.pfmt	= V4L2_PIX_FMT_RGB565X,
>  		.bpp	= 16,
>  		.bpl	= 2,
> -		.desc	= "RGB565 byteswapped",
>  		.pkf	= 3,
>  		.rgb	= 1,
>  	},
> @@ -398,9 +392,6 @@ static int sh_vou_enum_fmt_vid_out(struct file *file, void  *priv,
>  
>  	dev_dbg(vou_dev->v4l2_dev.dev, "%s()\n", __func__);
>  
> -	fmt->type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
> -	strscpy(fmt->description, vou_fmt[fmt->index].desc,
> -		sizeof(fmt->description));
>  	fmt->pixelformat = vou_fmt[fmt->index].pfmt;
>  
>  	return 0;
> @@ -494,7 +485,8 @@ static void sh_vou_configure_geometry(struct sh_vou_device *vou_dev,
>  	if (h_idx)
>  		vouvcr |= (1 << 14) | vou_scale_v_fld[h_idx - 1];
>  
> -	dev_dbg(vou_dev->v4l2_dev.dev, "%s: scaling 0x%x\n", fmt->desc, vouvcr);
> +	dev_dbg(vou_dev->v4l2_dev.dev, "0x%08x: scaling 0x%x\n",
> +		fmt->pfmt, vouvcr);
>  
>  	/* To produce a colour bar for testing set bit 23 of VOUVCR */
>  	sh_vou_reg_ab_write(vou_dev, VOUVCR, vouvcr);
> diff --git a/drivers/media/platform/ti-vpe/vpe.c b/drivers/media/platform/ti-vpe/vpe.c
> index 3f90f9413da1..a23eeba52723 100644
> --- a/drivers/media/platform/ti-vpe/vpe.c
> +++ b/drivers/media/platform/ti-vpe/vpe.c
> @@ -227,7 +227,6 @@ static const struct vpe_port_data port_data[11] = {
>  
>  /* driver info for each of the supported video formats */
>  struct vpe_fmt {
> -	char	*name;			/* human-readable name */
>  	u32	fourcc;			/* standard format identifier */
>  	u8	types;			/* CAPTURE and/or OUTPUT */
>  	u8	coplanar;		/* set for unpacked Luma and Chroma */
> @@ -237,7 +236,6 @@ struct vpe_fmt {
>  
>  static struct vpe_fmt vpe_formats[] = {
>  	{
> -		.name		= "NV16 YUV 422 co-planar",
>  		.fourcc		= V4L2_PIX_FMT_NV16,
>  		.types		= VPE_FMT_TYPE_CAPTURE | VPE_FMT_TYPE_OUTPUT,
>  		.coplanar	= 1,
> @@ -246,7 +244,6 @@ static struct vpe_fmt vpe_formats[] = {
>  				  },
>  	},
>  	{
> -		.name		= "NV12 YUV 420 co-planar",
>  		.fourcc		= V4L2_PIX_FMT_NV12,
>  		.types		= VPE_FMT_TYPE_CAPTURE | VPE_FMT_TYPE_OUTPUT,
>  		.coplanar	= 1,
> @@ -255,7 +252,6 @@ static struct vpe_fmt vpe_formats[] = {
>  				  },
>  	},
>  	{
> -		.name		= "YUYV 422 packed",
>  		.fourcc		= V4L2_PIX_FMT_YUYV,
>  		.types		= VPE_FMT_TYPE_CAPTURE | VPE_FMT_TYPE_OUTPUT,
>  		.coplanar	= 0,
> @@ -263,7 +259,6 @@ static struct vpe_fmt vpe_formats[] = {
>  				  },
>  	},
>  	{
> -		.name		= "UYVY 422 packed",
>  		.fourcc		= V4L2_PIX_FMT_UYVY,
>  		.types		= VPE_FMT_TYPE_CAPTURE | VPE_FMT_TYPE_OUTPUT,
>  		.coplanar	= 0,
> @@ -271,7 +266,6 @@ static struct vpe_fmt vpe_formats[] = {
>  				  },
>  	},
>  	{
> -		.name		= "RGB888 packed",
>  		.fourcc		= V4L2_PIX_FMT_RGB24,
>  		.types		= VPE_FMT_TYPE_CAPTURE,
>  		.coplanar	= 0,
> @@ -279,7 +273,6 @@ static struct vpe_fmt vpe_formats[] = {
>  				  },
>  	},
>  	{
> -		.name		= "ARGB32",
>  		.fourcc		= V4L2_PIX_FMT_RGB32,
>  		.types		= VPE_FMT_TYPE_CAPTURE,
>  		.coplanar	= 0,
> @@ -287,7 +280,6 @@ static struct vpe_fmt vpe_formats[] = {
>  				  },
>  	},
>  	{
> -		.name		= "BGR888 packed",
>  		.fourcc		= V4L2_PIX_FMT_BGR24,
>  		.types		= VPE_FMT_TYPE_CAPTURE,
>  		.coplanar	= 0,
> @@ -295,7 +287,6 @@ static struct vpe_fmt vpe_formats[] = {
>  				  },
>  	},
>  	{
> -		.name		= "ABGR32",
>  		.fourcc		= V4L2_PIX_FMT_BGR32,
>  		.types		= VPE_FMT_TYPE_CAPTURE,
>  		.coplanar	= 0,
> @@ -303,7 +294,6 @@ static struct vpe_fmt vpe_formats[] = {
>  				  },
>  	},
>  	{
> -		.name		= "RGB565",
>  		.fourcc		= V4L2_PIX_FMT_RGB565,
>  		.types		= VPE_FMT_TYPE_CAPTURE,
>  		.coplanar	= 0,
> @@ -311,7 +301,6 @@ static struct vpe_fmt vpe_formats[] = {
>  				  },
>  	},
>  	{
> -		.name		= "RGB5551",
>  		.fourcc		= V4L2_PIX_FMT_RGB555,
>  		.types		= VPE_FMT_TYPE_CAPTURE,
>  		.coplanar	= 0,
> @@ -1517,7 +1506,6 @@ static int __enum_fmt(struct v4l2_fmtdesc *f, u32 type)
>  	if (!fmt)
>  		return -EINVAL;
>  
> -	strscpy(f->description, fmt->name, sizeof(f->description));
>  	f->pixelformat = fmt->fourcc;
>  	return 0;
>  }
> diff --git a/drivers/media/platform/via-camera.c b/drivers/media/platform/via-camera.c
> index 038de7a2027a..d5f811820be9 100644
> --- a/drivers/media/platform/via-camera.c
> +++ b/drivers/media/platform/via-camera.c
> @@ -142,13 +142,11 @@ static struct via_camera *via_cam_info;
>   * now this information must be managed at this level too.
>   */
>  static struct via_format {
> -	__u8 *desc;
>  	__u32 pixelformat;
>  	int bpp;   /* Bytes per pixel */
>  	u32 mbus_code;
>  } via_formats[] = {
>  	{
> -		.desc		= "YUYV 4:2:2",
>  		.pixelformat	= V4L2_PIX_FMT_YUYV,
>  		.mbus_code	= MEDIA_BUS_FMT_YUYV8_2X8,
>  		.bpp		= 2,
> @@ -860,8 +858,6 @@ static int viacam_enum_fmt_vid_cap(struct file *filp, void *priv,
>  {
>  	if (fmt->index >= N_VIA_FMTS)
>  		return -EINVAL;
> -	strscpy(fmt->description, via_formats[fmt->index].desc,
> -		sizeof(fmt->description));
>  	fmt->pixelformat = via_formats[fmt->index].pixelformat;
>  	return 0;
>  }
> diff --git a/drivers/media/platform/xilinx/xilinx-dma.c b/drivers/media/platform/xilinx/xilinx-dma.c
> index c9d5fdb2d407..7bd2600cdc9a 100644
> --- a/drivers/media/platform/xilinx/xilinx-dma.c
> +++ b/drivers/media/platform/xilinx/xilinx-dma.c
> @@ -524,8 +524,6 @@ xvip_dma_enum_format(struct file *file, void *fh, struct v4l2_fmtdesc *f)
>  		return -EINVAL;
>  
>  	f->pixelformat = dma->format.pixelformat;
> -	strscpy(f->description, dma->fmtinfo->description,
> -		sizeof(f->description));
>  
>  	return 0;
>  }
> diff --git a/drivers/media/platform/xilinx/xilinx-vip.c b/drivers/media/platform/xilinx/xilinx-vip.c
> index 08a825c3a3f6..6ad61b08a31a 100644
> --- a/drivers/media/platform/xilinx/xilinx-vip.c
> +++ b/drivers/media/platform/xilinx/xilinx-vip.c
> @@ -25,21 +25,21 @@
>  
>  static const struct xvip_video_format xvip_video_formats[] = {
>  	{ XVIP_VF_YUV_422, 8, NULL, MEDIA_BUS_FMT_UYVY8_1X16,
> -	  2, V4L2_PIX_FMT_YUYV, "4:2:2, packed, YUYV" },
> +	  2, V4L2_PIX_FMT_YUYV },
>  	{ XVIP_VF_YUV_444, 8, NULL, MEDIA_BUS_FMT_VUY8_1X24,
> -	  3, V4L2_PIX_FMT_YUV444, "4:4:4, packed, YUYV" },
> +	  3, V4L2_PIX_FMT_YUV444 },
>  	{ XVIP_VF_RBG, 8, NULL, MEDIA_BUS_FMT_RBG888_1X24,
> -	  3, 0, NULL },
> +	  3, 0 },
>  	{ XVIP_VF_MONO_SENSOR, 8, "mono", MEDIA_BUS_FMT_Y8_1X8,
> -	  1, V4L2_PIX_FMT_GREY, "Greyscale 8-bit" },
> +	  1, V4L2_PIX_FMT_GREY },
>  	{ XVIP_VF_MONO_SENSOR, 8, "rggb", MEDIA_BUS_FMT_SRGGB8_1X8,
> -	  1, V4L2_PIX_FMT_SRGGB8, "Bayer 8-bit RGGB" },
> +	  1, V4L2_PIX_FMT_SRGGB8 },
>  	{ XVIP_VF_MONO_SENSOR, 8, "grbg", MEDIA_BUS_FMT_SGRBG8_1X8,
> -	  1, V4L2_PIX_FMT_SGRBG8, "Bayer 8-bit GRBG" },
> +	  1, V4L2_PIX_FMT_SGRBG8 },
>  	{ XVIP_VF_MONO_SENSOR, 8, "gbrg", MEDIA_BUS_FMT_SGBRG8_1X8,
> -	  1, V4L2_PIX_FMT_SGBRG8, "Bayer 8-bit GBRG" },
> +	  1, V4L2_PIX_FMT_SGBRG8 },
>  	{ XVIP_VF_MONO_SENSOR, 8, "bggr", MEDIA_BUS_FMT_SBGGR8_1X8,
> -	  1, V4L2_PIX_FMT_SBGGR8, "Bayer 8-bit BGGR" },
> +	  1, V4L2_PIX_FMT_SBGGR8 },
>  };
>  
>  /**
> diff --git a/drivers/media/platform/xilinx/xilinx-vip.h b/drivers/media/platform/xilinx/xilinx-vip.h
> index ba939dd52818..47da39211ae4 100644
> --- a/drivers/media/platform/xilinx/xilinx-vip.h
> +++ b/drivers/media/platform/xilinx/xilinx-vip.h
> @@ -108,7 +108,6 @@ struct xvip_device {
>   * @code: media bus format code
>   * @bpp: bytes per pixel (when stored in memory)
>   * @fourcc: V4L2 pixel format FCC identifier
> - * @description: format description, suitable for userspace
>   */
>  struct xvip_video_format {
>  	unsigned int vf_code;
> @@ -117,7 +116,6 @@ struct xvip_video_format {
>  	unsigned int code;
>  	unsigned int bpp;
>  	u32 fourcc;
> -	const char *description;
>  };
>  
>  const struct xvip_video_format *xvip_get_format_by_code(unsigned int code);
> diff --git a/include/media/drv-intf/exynos-fimc.h b/include/media/drv-intf/exynos-fimc.h
> index 54c214737142..bb846e167325 100644
> --- a/include/media/drv-intf/exynos-fimc.h
> +++ b/include/media/drv-intf/exynos-fimc.h
> @@ -90,7 +90,6 @@ struct fimc_source_info {
>  /**
>   * struct fimc_fmt - color format data structure
>   * @mbus_code: media bus pixel code, -1 if not applicable
> - * @name: format description
>   * @fourcc: fourcc code for this format, 0 if not applicable
>   * @color: the driver's private color format id
>   * @memplanes: number of physically non-contiguous data planes
> @@ -102,7 +101,6 @@ struct fimc_source_info {
>   */
>  struct fimc_fmt {
>  	u32 mbus_code;
> -	char	*name;
>  	u32	fourcc;
>  	u32	color;
>  	u16	memplanes;

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 5/5] media/platform: don't set description in ENUM_FMT
  2019-06-26 11:27 ` [PATCH 5/5] media/platform: don't set description in ENUM_FMT Hans Verkuil
  2019-06-26 14:36   ` Benoit Parrot
  2019-06-26 17:08   ` Laurent Pinchart
@ 2019-07-01  7:40   ` Lad, Prabhakar
  2 siblings, 0 replies; 12+ messages in thread
From: Lad, Prabhakar @ 2019-07-01  7:40 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: linux-media, Laurent Pinchart, Sylwester Nawrocki,
	Jonathan Corbet, Jacopo Mondi, Benoit Parrot

Hi Hans,


Thank you for the patch.

On Wed, Jun 26, 2019 at 12:27 PM Hans Verkuil <hverkuil-cisco@xs4all.nl> wrote:
>
> The V4L2 core sets the format description and flags 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>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Prabhakar Lad <prabhakar.csengg@gmail.com>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Cc: Jonathan Corbet <corbet@lwn.net>
> Cc: Jacopo Mondi <jacopo@jmondi.org>
> Cc: Benoit Parrot <bparrot@ti.com>
> ---
>  drivers/media/platform/am437x/am437x-vpfe.c   | 18 ++-----------
>  drivers/media/platform/davinci/vpbe_display.c | 14 ++--------
>  drivers/media/platform/davinci/vpif_capture.c | 11 ++------
>  drivers/media/platform/davinci/vpif_display.c |  4 ---

For the above,

Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>

Cheers,
Prabhakar Lad

>  drivers/media/platform/exynos-gsc/gsc-core.c  | 22 ---------------
>  drivers/media/platform/exynos-gsc/gsc-core.h  |  2 --
>  .../media/platform/exynos4-is/fimc-capture.c  |  3 ---
>  drivers/media/platform/exynos4-is/fimc-core.c | 20 --------------
>  .../platform/exynos4-is/fimc-isp-video.c      |  1 -
>  drivers/media/platform/exynos4-is/fimc-isp.c  |  3 ---
>  drivers/media/platform/exynos4-is/fimc-lite.c |  8 ------
>  drivers/media/platform/exynos4-is/fimc-m2m.c  |  1 -
>  drivers/media/platform/m2m-deinterlace.c      |  4 ---
>  .../media/platform/marvell-ccic/mcam-core.c   | 10 -------
>  drivers/media/platform/mx2_emmaprp.c          |  4 ---
>  drivers/media/platform/omap/omap_vout.c       |  7 -----
>  .../media/platform/s3c-camif/camif-capture.c  | 11 +++-----
>  drivers/media/platform/s3c-camif/camif-core.c |  6 -----
>  drivers/media/platform/s3c-camif/camif-core.h |  1 -
>  drivers/media/platform/s5p-g2d/g2d.c          |  6 -----
>  drivers/media/platform/s5p-g2d/g2d.h          |  1 -
>  drivers/media/platform/s5p-jpeg/jpeg-core.c   | 27 -------------------
>  drivers/media/platform/s5p-jpeg/jpeg-core.h   |  2 --
>  .../media/platform/s5p-mfc/s5p_mfc_common.h   |  1 -
>  drivers/media/platform/s5p-mfc/s5p_mfc_dec.c  | 15 -----------
>  drivers/media/platform/s5p-mfc/s5p_mfc_enc.c  | 10 -------
>  drivers/media/platform/sh_veu.c               | 19 ++++++-------
>  drivers/media/platform/sh_vou.c               | 12 ++-------
>  drivers/media/platform/ti-vpe/vpe.c           | 12 ---------
>  drivers/media/platform/via-camera.c           |  4 ---
>  drivers/media/platform/xilinx/xilinx-dma.c    |  2 --
>  drivers/media/platform/xilinx/xilinx-vip.c    | 16 +++++------
>  drivers/media/platform/xilinx/xilinx-vip.h    |  2 --
>  include/media/drv-intf/exynos-fimc.h          |  2 --
>  34 files changed, 28 insertions(+), 253 deletions(-)
>
> diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c
> index fe7b937eb5f2..7582c26f8459 100644
> --- a/drivers/media/platform/am437x/am437x-vpfe.c
> +++ b/drivers/media/platform/am437x/am437x-vpfe.c
> @@ -76,7 +76,6 @@ struct bus_format {
>
>  /*
>   * struct vpfe_fmt - VPFE media bus format information
> - * @name: V4L2 format description
>   * @code: V4L2 media bus format code
>   * @shifted: V4L2 media bus format code for the same pixel layout but
>   *     shifted to be 8 bits per pixel. =0 if format is not shiftable.
> @@ -86,7 +85,6 @@ struct bus_format {
>   * @supported: Indicates format supported by subdev
>   */
>  struct vpfe_fmt {
> -       const char *name;
>         u32 fourcc;
>         u32 code;
>         struct bus_format l;
> @@ -97,7 +95,6 @@ struct vpfe_fmt {
>
>  static struct vpfe_fmt formats[] = {
>         {
> -               .name           = "YUV 4:2:2 packed, YCbYCr",
>                 .fourcc         = V4L2_PIX_FMT_YUYV,
>                 .code           = MEDIA_BUS_FMT_YUYV8_2X8,
>                 .l.width        = 10,
> @@ -106,7 +103,6 @@ static struct vpfe_fmt formats[] = {
>                 .s.bpp          = 2,
>                 .supported      = false,
>         }, {
> -               .name           = "YUV 4:2:2 packed, CbYCrY",
>                 .fourcc         = V4L2_PIX_FMT_UYVY,
>                 .code           = MEDIA_BUS_FMT_UYVY8_2X8,
>                 .l.width        = 10,
> @@ -115,7 +111,6 @@ static struct vpfe_fmt formats[] = {
>                 .s.bpp          = 2,
>                 .supported      = false,
>         }, {
> -               .name           = "YUV 4:2:2 packed, YCrYCb",
>                 .fourcc         = V4L2_PIX_FMT_YVYU,
>                 .code           = MEDIA_BUS_FMT_YVYU8_2X8,
>                 .l.width        = 10,
> @@ -124,7 +119,6 @@ static struct vpfe_fmt formats[] = {
>                 .s.bpp          = 2,
>                 .supported      = false,
>         }, {
> -               .name           = "YUV 4:2:2 packed, CrYCbY",
>                 .fourcc         = V4L2_PIX_FMT_VYUY,
>                 .code           = MEDIA_BUS_FMT_VYUY8_2X8,
>                 .l.width        = 10,
> @@ -133,7 +127,6 @@ static struct vpfe_fmt formats[] = {
>                 .s.bpp          = 2,
>                 .supported      = false,
>         }, {
> -               .name           = "RAW8 BGGR",
>                 .fourcc         = V4L2_PIX_FMT_SBGGR8,
>                 .code           = MEDIA_BUS_FMT_SBGGR8_1X8,
>                 .l.width        = 10,
> @@ -142,7 +135,6 @@ static struct vpfe_fmt formats[] = {
>                 .s.bpp          = 1,
>                 .supported      = false,
>         }, {
> -               .name           = "RAW8 GBRG",
>                 .fourcc         = V4L2_PIX_FMT_SGBRG8,
>                 .code           = MEDIA_BUS_FMT_SGBRG8_1X8,
>                 .l.width        = 10,
> @@ -151,7 +143,6 @@ static struct vpfe_fmt formats[] = {
>                 .s.bpp          = 1,
>                 .supported      = false,
>         }, {
> -               .name           = "RAW8 GRBG",
>                 .fourcc         = V4L2_PIX_FMT_SGRBG8,
>                 .code           = MEDIA_BUS_FMT_SGRBG8_1X8,
>                 .l.width        = 10,
> @@ -160,7 +151,6 @@ static struct vpfe_fmt formats[] = {
>                 .s.bpp          = 1,
>                 .supported      = false,
>         }, {
> -               .name           = "RAW8 RGGB",
>                 .fourcc         = V4L2_PIX_FMT_SRGGB8,
>                 .code           = MEDIA_BUS_FMT_SRGGB8_1X8,
>                 .l.width        = 10,
> @@ -169,7 +159,6 @@ static struct vpfe_fmt formats[] = {
>                 .s.bpp          = 1,
>                 .supported      = false,
>         }, {
> -               .name           = "RGB565 (LE)",
>                 .fourcc         = V4L2_PIX_FMT_RGB565,
>                 .code           = MEDIA_BUS_FMT_RGB565_2X8_LE,
>                 .l.width        = 10,
> @@ -178,7 +167,6 @@ static struct vpfe_fmt formats[] = {
>                 .s.bpp          = 2,
>                 .supported      = false,
>         }, {
> -               .name           = "RGB565 (BE)",
>                 .fourcc         = V4L2_PIX_FMT_RGB565X,
>                 .code           = MEDIA_BUS_FMT_RGB565_2X8_BE,
>                 .l.width        = 10,
> @@ -1540,12 +1528,10 @@ static int vpfe_enum_fmt(struct file *file, void  *priv,
>         if (!fmt)
>                 return -EINVAL;
>
> -       strscpy(f->description, fmt->name, sizeof(f->description));
>         f->pixelformat = fmt->fourcc;
> -       f->type = vpfe->fmt.type;
>
> -       vpfe_dbg(1, vpfe, "vpfe_enum_format: mbus index: %d code: %x pixelformat: %s [%s]\n",
> -               f->index, fmt->code, print_fourcc(fmt->fourcc), fmt->name);
> +       vpfe_dbg(1, vpfe, "vpfe_enum_format: mbus index: %d code: %x pixelformat: %s\n",
> +                f->index, fmt->code, print_fourcc(fmt->fourcc));
>
>         return 0;
>  }
> diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c
> index 000b191c42d8..ed10a9bbf96b 100644
> --- a/drivers/media/platform/davinci/vpbe_display.c
> +++ b/drivers/media/platform/davinci/vpbe_display.c
> @@ -792,7 +792,6 @@ static int vpbe_display_enum_fmt(struct file *file, void  *priv,
>  {
>         struct vpbe_layer *layer = video_drvdata(file);
>         struct vpbe_device *vpbe_dev = layer->disp_dev->vpbe_dev;
> -       unsigned int index = 0;
>
>         v4l2_dbg(1, debug, &vpbe_dev->v4l2_dev,
>                                 "VIDIOC_ENUM_FMT, layer id = %d\n",
> @@ -803,19 +802,10 @@ static int vpbe_display_enum_fmt(struct file *file, void  *priv,
>         }
>
>         /* Fill in the information about format */
> -       index = fmt->index;
> -       memset(fmt, 0, sizeof(*fmt));
> -       fmt->index = index;
> -       fmt->type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
> -       if (index == 0) {
> -               strscpy(fmt->description, "YUV 4:2:2 - UYVY",
> -                       sizeof(fmt->description));
> +       if (fmt->index == 0)
>                 fmt->pixelformat = V4L2_PIX_FMT_UYVY;
> -       } else {
> -               strscpy(fmt->description, "Y/CbCr 4:2:0",
> -                       sizeof(fmt->description));
> +       else
>                 fmt->pixelformat = V4L2_PIX_FMT_NV12;
> -       }
>
>         return 0;
>  }
> diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c
> index f0f7ef638c56..621d28470d2b 100644
> --- a/drivers/media/platform/davinci/vpif_capture.c
> +++ b/drivers/media/platform/davinci/vpif_capture.c
> @@ -938,17 +938,10 @@ static int vpif_enum_fmt_vid_cap(struct file *file, void  *priv,
>         }
>
>         /* Fill in the information about format */
> -       if (ch->vpifparams.iface.if_type == VPIF_IF_RAW_BAYER) {
> -               fmt->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
> -               strscpy(fmt->description, "Raw Mode -Bayer Pattern GrRBGb",
> -                       sizeof(fmt->description));
> +       if (ch->vpifparams.iface.if_type == VPIF_IF_RAW_BAYER)
>                 fmt->pixelformat = V4L2_PIX_FMT_SBGGR8;
> -       } else {
> -               fmt->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
> -               strscpy(fmt->description, "YCbCr4:2:2 Semi-Planar",
> -                       sizeof(fmt->description));
> +       else
>                 fmt->pixelformat = V4L2_PIX_FMT_NV16;
> -       }
>         return 0;
>  }
>
> diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c
> index a69897c68a50..be32f87001cd 100644
> --- a/drivers/media/platform/davinci/vpif_display.c
> +++ b/drivers/media/platform/davinci/vpif_display.c
> @@ -601,11 +601,7 @@ static int vpif_enum_fmt_vid_out(struct file *file, void  *priv,
>                 return -EINVAL;
>
>         /* Fill in the information about format */
> -       fmt->type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
> -       strscpy(fmt->description, "YCbCr4:2:2 YC Planar",
> -               sizeof(fmt->description));
>         fmt->pixelformat = V4L2_PIX_FMT_YUV422P;
> -       fmt->flags = 0;
>         return 0;
>  }
>
> diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c
> index 854869f0024e..f6650b45bc3d 100644
> --- a/drivers/media/platform/exynos-gsc/gsc-core.c
> +++ b/drivers/media/platform/exynos-gsc/gsc-core.c
> @@ -27,21 +27,18 @@
>
>  static const struct gsc_fmt gsc_formats[] = {
>         {
> -               .name           = "RGB565",
>                 .pixelformat    = V4L2_PIX_FMT_RGB565X,
>                 .depth          = { 16 },
>                 .color          = GSC_RGB,
>                 .num_planes     = 1,
>                 .num_comp       = 1,
>         }, {
> -               .name           = "BGRX-8-8-8-8, 32 bpp",
>                 .pixelformat    = V4L2_PIX_FMT_BGR32,
>                 .depth          = { 32 },
>                 .color          = GSC_RGB,
>                 .num_planes     = 1,
>                 .num_comp       = 1,
>         }, {
> -               .name           = "YUV 4:2:2 packed, YCbYCr",
>                 .pixelformat    = V4L2_PIX_FMT_YUYV,
>                 .depth          = { 16 },
>                 .color          = GSC_YUV422,
> @@ -51,7 +48,6 @@ static const struct gsc_fmt gsc_formats[] = {
>                 .num_comp       = 1,
>                 .mbus_code      = MEDIA_BUS_FMT_YUYV8_2X8,
>         }, {
> -               .name           = "YUV 4:2:2 packed, CbYCrY",
>                 .pixelformat    = V4L2_PIX_FMT_UYVY,
>                 .depth          = { 16 },
>                 .color          = GSC_YUV422,
> @@ -61,7 +57,6 @@ static const struct gsc_fmt gsc_formats[] = {
>                 .num_comp       = 1,
>                 .mbus_code      = MEDIA_BUS_FMT_UYVY8_2X8,
>         }, {
> -               .name           = "YUV 4:2:2 packed, CrYCbY",
>                 .pixelformat    = V4L2_PIX_FMT_VYUY,
>                 .depth          = { 16 },
>                 .color          = GSC_YUV422,
> @@ -71,7 +66,6 @@ static const struct gsc_fmt gsc_formats[] = {
>                 .num_comp       = 1,
>                 .mbus_code      = MEDIA_BUS_FMT_VYUY8_2X8,
>         }, {
> -               .name           = "YUV 4:2:2 packed, YCrYCb",
>                 .pixelformat    = V4L2_PIX_FMT_YVYU,
>                 .depth          = { 16 },
>                 .color          = GSC_YUV422,
> @@ -81,7 +75,6 @@ static const struct gsc_fmt gsc_formats[] = {
>                 .num_comp       = 1,
>                 .mbus_code      = MEDIA_BUS_FMT_YVYU8_2X8,
>         }, {
> -               .name           = "YUV 4:4:4 planar, YCbYCr",
>                 .pixelformat    = V4L2_PIX_FMT_YUV32,
>                 .depth          = { 32 },
>                 .color          = GSC_YUV444,
> @@ -90,7 +83,6 @@ static const struct gsc_fmt gsc_formats[] = {
>                 .num_planes     = 1,
>                 .num_comp       = 1,
>         }, {
> -               .name           = "YUV 4:2:2 planar, Y/Cb/Cr",
>                 .pixelformat    = V4L2_PIX_FMT_YUV422P,
>                 .depth          = { 16 },
>                 .color          = GSC_YUV422,
> @@ -99,7 +91,6 @@ static const struct gsc_fmt gsc_formats[] = {
>                 .num_planes     = 1,
>                 .num_comp       = 3,
>         }, {
> -               .name           = "YUV 4:2:2 planar, Y/CbCr",
>                 .pixelformat    = V4L2_PIX_FMT_NV16,
>                 .depth          = { 16 },
>                 .color          = GSC_YUV422,
> @@ -108,7 +99,6 @@ static const struct gsc_fmt gsc_formats[] = {
>                 .num_planes     = 1,
>                 .num_comp       = 2,
>         }, {
> -               .name           = "YUV 4:2:2 non-contig, Y/CbCr",
>                 .pixelformat    = V4L2_PIX_FMT_NV16M,
>                 .depth          = { 8, 8 },
>                 .color          = GSC_YUV422,
> @@ -117,7 +107,6 @@ static const struct gsc_fmt gsc_formats[] = {
>                 .num_planes     = 2,
>                 .num_comp       = 2,
>         }, {
> -               .name           = "YUV 4:2:2 planar, Y/CrCb",
>                 .pixelformat    = V4L2_PIX_FMT_NV61,
>                 .depth          = { 16 },
>                 .color          = GSC_YUV422,
> @@ -126,7 +115,6 @@ static const struct gsc_fmt gsc_formats[] = {
>                 .num_planes     = 1,
>                 .num_comp       = 2,
>         }, {
> -               .name           = "YUV 4:2:2 non-contig, Y/CrCb",
>                 .pixelformat    = V4L2_PIX_FMT_NV61M,
>                 .depth          = { 8, 8 },
>                 .color          = GSC_YUV422,
> @@ -135,7 +123,6 @@ static const struct gsc_fmt gsc_formats[] = {
>                 .num_planes     = 2,
>                 .num_comp       = 2,
>         }, {
> -               .name           = "YUV 4:2:0 planar, YCbCr",
>                 .pixelformat    = V4L2_PIX_FMT_YUV420,
>                 .depth          = { 12 },
>                 .color          = GSC_YUV420,
> @@ -144,7 +131,6 @@ static const struct gsc_fmt gsc_formats[] = {
>                 .num_planes     = 1,
>                 .num_comp       = 3,
>         }, {
> -               .name           = "YUV 4:2:0 planar, YCrCb",
>                 .pixelformat    = V4L2_PIX_FMT_YVU420,
>                 .depth          = { 12 },
>                 .color          = GSC_YUV420,
> @@ -154,7 +140,6 @@ static const struct gsc_fmt gsc_formats[] = {
>                 .num_comp       = 3,
>
>         }, {
> -               .name           = "YUV 4:2:0 planar, Y/CbCr",
>                 .pixelformat    = V4L2_PIX_FMT_NV12,
>                 .depth          = { 12 },
>                 .color          = GSC_YUV420,
> @@ -163,7 +148,6 @@ static const struct gsc_fmt gsc_formats[] = {
>                 .num_planes     = 1,
>                 .num_comp       = 2,
>         }, {
> -               .name           = "YUV 4:2:0 planar, Y/CrCb",
>                 .pixelformat    = V4L2_PIX_FMT_NV21,
>                 .depth          = { 12 },
>                 .color          = GSC_YUV420,
> @@ -172,7 +156,6 @@ static const struct gsc_fmt gsc_formats[] = {
>                 .num_planes     = 1,
>                 .num_comp       = 2,
>         }, {
> -               .name           = "YUV 4:2:0 non-contig. 2p, Y/CrCb",
>                 .pixelformat    = V4L2_PIX_FMT_NV21M,
>                 .depth          = { 8, 4 },
>                 .color          = GSC_YUV420,
> @@ -181,7 +164,6 @@ static const struct gsc_fmt gsc_formats[] = {
>                 .num_planes     = 2,
>                 .num_comp       = 2,
>         }, {
> -               .name           = "YUV 4:2:0 non-contig. 2p, Y/CbCr",
>                 .pixelformat    = V4L2_PIX_FMT_NV12M,
>                 .depth          = { 8, 4 },
>                 .color          = GSC_YUV420,
> @@ -190,7 +172,6 @@ static const struct gsc_fmt gsc_formats[] = {
>                 .num_planes     = 2,
>                 .num_comp       = 2,
>         }, {
> -               .name           = "YUV 4:2:0 non-contig. 3p, Y/Cb/Cr",
>                 .pixelformat    = V4L2_PIX_FMT_YUV420M,
>                 .depth          = { 8, 2, 2 },
>                 .color          = GSC_YUV420,
> @@ -199,7 +180,6 @@ static const struct gsc_fmt gsc_formats[] = {
>                 .num_planes     = 3,
>                 .num_comp       = 3,
>         }, {
> -               .name           = "YUV 4:2:0 non-contig. 3p, Y/Cr/Cb",
>                 .pixelformat    = V4L2_PIX_FMT_YVU420M,
>                 .depth          = { 8, 2, 2 },
>                 .color          = GSC_YUV420,
> @@ -208,7 +188,6 @@ static const struct gsc_fmt gsc_formats[] = {
>                 .num_planes     = 3,
>                 .num_comp       = 3,
>         }, {
> -               .name           = "YUV 4:2:0 n.c. 2p, Y/CbCr tiled",
>                 .pixelformat    = V4L2_PIX_FMT_NV12MT_16X16,
>                 .depth          = { 8, 4 },
>                 .color          = GSC_YUV420,
> @@ -335,7 +314,6 @@ int gsc_enum_fmt(struct v4l2_fmtdesc *f)
>         if (!fmt)
>                 return -EINVAL;
>
> -       strscpy(f->description, fmt->name, sizeof(f->description));
>         f->pixelformat = fmt->pixelformat;
>
>         return 0;
> diff --git a/drivers/media/platform/exynos-gsc/gsc-core.h b/drivers/media/platform/exynos-gsc/gsc-core.h
> index 8ea49ca004fd..0e114f114c24 100644
> --- a/drivers/media/platform/exynos-gsc/gsc-core.h
> +++ b/drivers/media/platform/exynos-gsc/gsc-core.h
> @@ -105,7 +105,6 @@ enum gsc_yuv_fmt {
>  /**
>   * struct gsc_fmt - the driver's internal color format data
>   * @mbus_code: Media Bus pixel code, -1 if not applicable
> - * @name: format description
>   * @pixelformat: the fourcc code for this format, 0 if not applicable
>   * @yorder: Y/C order
>   * @corder: Chrominance order control
> @@ -116,7 +115,6 @@ enum gsc_yuv_fmt {
>   */
>  struct gsc_fmt {
>         u32 mbus_code;
> -       char    *name;
>         u32     pixelformat;
>         u32     color;
>         u32     yorder;
> diff --git a/drivers/media/platform/exynos4-is/fimc-capture.c b/drivers/media/platform/exynos4-is/fimc-capture.c
> index 84b91e248c5a..ab91e8e0b41c 100644
> --- a/drivers/media/platform/exynos4-is/fimc-capture.c
> +++ b/drivers/media/platform/exynos4-is/fimc-capture.c
> @@ -741,10 +741,7 @@ static int fimc_cap_enum_fmt(struct file *file, void *priv,
>                                f->index);
>         if (!fmt)
>                 return -EINVAL;
> -       strscpy(f->description, fmt->name, sizeof(f->description));
>         f->pixelformat = fmt->fourcc;
> -       if (fmt->fourcc == MEDIA_BUS_FMT_JPEG_1X8)
> -               f->flags |= V4L2_FMT_FLAG_COMPRESSED;
>         return 0;
>  }
>
> diff --git a/drivers/media/platform/exynos4-is/fimc-core.c b/drivers/media/platform/exynos4-is/fimc-core.c
> index 7006f54bfee2..cde60fbb23a8 100644
> --- a/drivers/media/platform/exynos4-is/fimc-core.c
> +++ b/drivers/media/platform/exynos4-is/fimc-core.c
> @@ -36,7 +36,6 @@ static char *fimc_clocks[MAX_FIMC_CLOCKS] = {
>
>  static struct fimc_fmt fimc_formats[] = {
>         {
> -               .name           = "RGB565",
>                 .fourcc         = V4L2_PIX_FMT_RGB565,
>                 .depth          = { 16 },
>                 .color          = FIMC_FMT_RGB565,
> @@ -44,7 +43,6 @@ static struct fimc_fmt fimc_formats[] = {
>                 .colplanes      = 1,
>                 .flags          = FMT_FLAGS_M2M,
>         }, {
> -               .name           = "BGR666",
>                 .fourcc         = V4L2_PIX_FMT_BGR666,
>                 .depth          = { 32 },
>                 .color          = FIMC_FMT_RGB666,
> @@ -52,7 +50,6 @@ static struct fimc_fmt fimc_formats[] = {
>                 .colplanes      = 1,
>                 .flags          = FMT_FLAGS_M2M,
>         }, {
> -               .name           = "BGRA8888, 32 bpp",
>                 .fourcc         = V4L2_PIX_FMT_BGR32,
>                 .depth          = { 32 },
>                 .color          = FIMC_FMT_RGB888,
> @@ -60,7 +57,6 @@ static struct fimc_fmt fimc_formats[] = {
>                 .colplanes      = 1,
>                 .flags          = FMT_FLAGS_M2M | FMT_HAS_ALPHA,
>         }, {
> -               .name           = "ARGB1555",
>                 .fourcc         = V4L2_PIX_FMT_RGB555,
>                 .depth          = { 16 },
>                 .color          = FIMC_FMT_RGB555,
> @@ -68,7 +64,6 @@ static struct fimc_fmt fimc_formats[] = {
>                 .colplanes      = 1,
>                 .flags          = FMT_FLAGS_M2M_OUT | FMT_HAS_ALPHA,
>         }, {
> -               .name           = "ARGB4444",
>                 .fourcc         = V4L2_PIX_FMT_RGB444,
>                 .depth          = { 16 },
>                 .color          = FIMC_FMT_RGB444,
> @@ -76,11 +71,9 @@ static struct fimc_fmt fimc_formats[] = {
>                 .colplanes      = 1,
>                 .flags          = FMT_FLAGS_M2M_OUT | FMT_HAS_ALPHA,
>         }, {
> -               .name           = "YUV 4:4:4",
>                 .mbus_code      = MEDIA_BUS_FMT_YUV10_1X30,
>                 .flags          = FMT_FLAGS_WRITEBACK,
>         }, {
> -               .name           = "YUV 4:2:2 packed, YCbYCr",
>                 .fourcc         = V4L2_PIX_FMT_YUYV,
>                 .depth          = { 16 },
>                 .color          = FIMC_FMT_YCBYCR422,
> @@ -89,7 +82,6 @@ static struct fimc_fmt fimc_formats[] = {
>                 .mbus_code      = MEDIA_BUS_FMT_YUYV8_2X8,
>                 .flags          = FMT_FLAGS_M2M | FMT_FLAGS_CAM,
>         }, {
> -               .name           = "YUV 4:2:2 packed, CbYCrY",
>                 .fourcc         = V4L2_PIX_FMT_UYVY,
>                 .depth          = { 16 },
>                 .color          = FIMC_FMT_CBYCRY422,
> @@ -98,7 +90,6 @@ static struct fimc_fmt fimc_formats[] = {
>                 .mbus_code      = MEDIA_BUS_FMT_UYVY8_2X8,
>                 .flags          = FMT_FLAGS_M2M | FMT_FLAGS_CAM,
>         }, {
> -               .name           = "YUV 4:2:2 packed, CrYCbY",
>                 .fourcc         = V4L2_PIX_FMT_VYUY,
>                 .depth          = { 16 },
>                 .color          = FIMC_FMT_CRYCBY422,
> @@ -107,7 +98,6 @@ static struct fimc_fmt fimc_formats[] = {
>                 .mbus_code      = MEDIA_BUS_FMT_VYUY8_2X8,
>                 .flags          = FMT_FLAGS_M2M | FMT_FLAGS_CAM,
>         }, {
> -               .name           = "YUV 4:2:2 packed, YCrYCb",
>                 .fourcc         = V4L2_PIX_FMT_YVYU,
>                 .depth          = { 16 },
>                 .color          = FIMC_FMT_YCRYCB422,
> @@ -116,7 +106,6 @@ static struct fimc_fmt fimc_formats[] = {
>                 .mbus_code      = MEDIA_BUS_FMT_YVYU8_2X8,
>                 .flags          = FMT_FLAGS_M2M | FMT_FLAGS_CAM,
>         }, {
> -               .name           = "YUV 4:2:2 planar, Y/Cb/Cr",
>                 .fourcc         = V4L2_PIX_FMT_YUV422P,
>                 .depth          = { 16 },
>                 .color          = FIMC_FMT_YCBYCR422,
> @@ -124,7 +113,6 @@ static struct fimc_fmt fimc_formats[] = {
>                 .colplanes      = 3,
>                 .flags          = FMT_FLAGS_M2M,
>         }, {
> -               .name           = "YUV 4:2:2 planar, Y/CbCr",
>                 .fourcc         = V4L2_PIX_FMT_NV16,
>                 .depth          = { 16 },
>                 .color          = FIMC_FMT_YCBYCR422,
> @@ -132,7 +120,6 @@ static struct fimc_fmt fimc_formats[] = {
>                 .colplanes      = 2,
>                 .flags          = FMT_FLAGS_M2M,
>         }, {
> -               .name           = "YUV 4:2:2 planar, Y/CrCb",
>                 .fourcc         = V4L2_PIX_FMT_NV61,
>                 .depth          = { 16 },
>                 .color          = FIMC_FMT_YCRYCB422,
> @@ -140,7 +127,6 @@ static struct fimc_fmt fimc_formats[] = {
>                 .colplanes      = 2,
>                 .flags          = FMT_FLAGS_M2M,
>         }, {
> -               .name           = "YUV 4:2:0 planar, YCbCr",
>                 .fourcc         = V4L2_PIX_FMT_YUV420,
>                 .depth          = { 12 },
>                 .color          = FIMC_FMT_YCBCR420,
> @@ -148,7 +134,6 @@ static struct fimc_fmt fimc_formats[] = {
>                 .colplanes      = 3,
>                 .flags          = FMT_FLAGS_M2M,
>         }, {
> -               .name           = "YUV 4:2:0 planar, Y/CbCr",
>                 .fourcc         = V4L2_PIX_FMT_NV12,
>                 .depth          = { 12 },
>                 .color          = FIMC_FMT_YCBCR420,
> @@ -156,7 +141,6 @@ static struct fimc_fmt fimc_formats[] = {
>                 .colplanes      = 2,
>                 .flags          = FMT_FLAGS_M2M,
>         }, {
> -               .name           = "YUV 4:2:0 non-contig. 2p, Y/CbCr",
>                 .fourcc         = V4L2_PIX_FMT_NV12M,
>                 .color          = FIMC_FMT_YCBCR420,
>                 .depth          = { 8, 4 },
> @@ -164,7 +148,6 @@ static struct fimc_fmt fimc_formats[] = {
>                 .colplanes      = 2,
>                 .flags          = FMT_FLAGS_M2M,
>         }, {
> -               .name           = "YUV 4:2:0 non-contig. 3p, Y/Cb/Cr",
>                 .fourcc         = V4L2_PIX_FMT_YUV420M,
>                 .color          = FIMC_FMT_YCBCR420,
>                 .depth          = { 8, 2, 2 },
> @@ -172,7 +155,6 @@ static struct fimc_fmt fimc_formats[] = {
>                 .colplanes      = 3,
>                 .flags          = FMT_FLAGS_M2M,
>         }, {
> -               .name           = "YUV 4:2:0 non-contig. 2p, tiled",
>                 .fourcc         = V4L2_PIX_FMT_NV12MT,
>                 .color          = FIMC_FMT_YCBCR420,
>                 .depth          = { 8, 4 },
> @@ -180,7 +162,6 @@ static struct fimc_fmt fimc_formats[] = {
>                 .colplanes      = 2,
>                 .flags          = FMT_FLAGS_M2M,
>         }, {
> -               .name           = "JPEG encoded data",
>                 .fourcc         = V4L2_PIX_FMT_JPEG,
>                 .color          = FIMC_FMT_JPEG,
>                 .depth          = { 8 },
> @@ -189,7 +170,6 @@ static struct fimc_fmt fimc_formats[] = {
>                 .mbus_code      = MEDIA_BUS_FMT_JPEG_1X8,
>                 .flags          = FMT_FLAGS_CAM | FMT_FLAGS_COMPRESSED,
>         }, {
> -               .name           = "S5C73MX interleaved UYVY/JPEG",
>                 .fourcc         = V4L2_PIX_FMT_S5C_UYVY_JPG,
>                 .color          = FIMC_FMT_YUYV_JPEG,
>                 .depth          = { 8 },
> diff --git a/drivers/media/platform/exynos4-is/fimc-isp-video.c b/drivers/media/platform/exynos4-is/fimc-isp-video.c
> index 2226a13ac89b..ec7a97e7582d 100644
> --- a/drivers/media/platform/exynos4-is/fimc-isp-video.c
> +++ b/drivers/media/platform/exynos4-is/fimc-isp-video.c
> @@ -365,7 +365,6 @@ static int isp_video_enum_fmt(struct file *file, void *priv,
>         if (WARN_ON(fmt == NULL))
>                 return -EINVAL;
>
> -       strscpy(f->description, fmt->name, sizeof(f->description));
>         f->pixelformat = fmt->fourcc;
>
>         return 0;
> diff --git a/drivers/media/platform/exynos4-is/fimc-isp.c b/drivers/media/platform/exynos4-is/fimc-isp.c
> index 9a48c0f69320..dfb8285e4f0b 100644
> --- a/drivers/media/platform/exynos4-is/fimc-isp.c
> +++ b/drivers/media/platform/exynos4-is/fimc-isp.c
> @@ -36,21 +36,18 @@ module_param_named(debug_isp, fimc_isp_debug, int, S_IRUGO | S_IWUSR);
>
>  static const struct fimc_fmt fimc_isp_formats[FIMC_ISP_NUM_FORMATS] = {
>         {
> -               .name           = "RAW8 (GRBG)",
>                 .fourcc         = V4L2_PIX_FMT_SGRBG8,
>                 .depth          = { 8 },
>                 .color          = FIMC_FMT_RAW8,
>                 .memplanes      = 1,
>                 .mbus_code      = MEDIA_BUS_FMT_SGRBG8_1X8,
>         }, {
> -               .name           = "RAW10 (GRBG)",
>                 .fourcc         = V4L2_PIX_FMT_SGRBG10,
>                 .depth          = { 10 },
>                 .color          = FIMC_FMT_RAW10,
>                 .memplanes      = 1,
>                 .mbus_code      = MEDIA_BUS_FMT_SGRBG10_1X10,
>         }, {
> -               .name           = "RAW12 (GRBG)",
>                 .fourcc         = V4L2_PIX_FMT_SGRBG12,
>                 .depth          = { 12 },
>                 .color          = FIMC_FMT_RAW12,
> diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c
> index e71342756d88..91580b59e972 100644
> --- a/drivers/media/platform/exynos4-is/fimc-lite.c
> +++ b/drivers/media/platform/exynos4-is/fimc-lite.c
> @@ -42,7 +42,6 @@ module_param(debug, int, 0644);
>
>  static const struct fimc_fmt fimc_lite_formats[] = {
>         {
> -               .name           = "YUV 4:2:2 packed, YCbYCr",
>                 .fourcc         = V4L2_PIX_FMT_YUYV,
>                 .colorspace     = V4L2_COLORSPACE_JPEG,
>                 .depth          = { 16 },
> @@ -51,7 +50,6 @@ static const struct fimc_fmt fimc_lite_formats[] = {
>                 .mbus_code      = MEDIA_BUS_FMT_YUYV8_2X8,
>                 .flags          = FMT_FLAGS_YUV,
>         }, {
> -               .name           = "YUV 4:2:2 packed, CbYCrY",
>                 .fourcc         = V4L2_PIX_FMT_UYVY,
>                 .colorspace     = V4L2_COLORSPACE_JPEG,
>                 .depth          = { 16 },
> @@ -60,7 +58,6 @@ static const struct fimc_fmt fimc_lite_formats[] = {
>                 .mbus_code      = MEDIA_BUS_FMT_UYVY8_2X8,
>                 .flags          = FMT_FLAGS_YUV,
>         }, {
> -               .name           = "YUV 4:2:2 packed, CrYCbY",
>                 .fourcc         = V4L2_PIX_FMT_VYUY,
>                 .colorspace     = V4L2_COLORSPACE_JPEG,
>                 .depth          = { 16 },
> @@ -69,7 +66,6 @@ static const struct fimc_fmt fimc_lite_formats[] = {
>                 .mbus_code      = MEDIA_BUS_FMT_VYUY8_2X8,
>                 .flags          = FMT_FLAGS_YUV,
>         }, {
> -               .name           = "YUV 4:2:2 packed, YCrYCb",
>                 .fourcc         = V4L2_PIX_FMT_YVYU,
>                 .colorspace     = V4L2_COLORSPACE_JPEG,
>                 .depth          = { 16 },
> @@ -78,7 +74,6 @@ static const struct fimc_fmt fimc_lite_formats[] = {
>                 .mbus_code      = MEDIA_BUS_FMT_YVYU8_2X8,
>                 .flags          = FMT_FLAGS_YUV,
>         }, {
> -               .name           = "RAW8 (GRBG)",
>                 .fourcc         = V4L2_PIX_FMT_SGRBG8,
>                 .colorspace     = V4L2_COLORSPACE_SRGB,
>                 .depth          = { 8 },
> @@ -87,7 +82,6 @@ static const struct fimc_fmt fimc_lite_formats[] = {
>                 .mbus_code      = MEDIA_BUS_FMT_SGRBG8_1X8,
>                 .flags          = FMT_FLAGS_RAW_BAYER,
>         }, {
> -               .name           = "RAW10 (GRBG)",
>                 .fourcc         = V4L2_PIX_FMT_SGRBG10,
>                 .colorspace     = V4L2_COLORSPACE_SRGB,
>                 .depth          = { 16 },
> @@ -96,7 +90,6 @@ static const struct fimc_fmt fimc_lite_formats[] = {
>                 .mbus_code      = MEDIA_BUS_FMT_SGRBG10_1X10,
>                 .flags          = FMT_FLAGS_RAW_BAYER,
>         }, {
> -               .name           = "RAW12 (GRBG)",
>                 .fourcc         = V4L2_PIX_FMT_SGRBG12,
>                 .colorspace     = V4L2_COLORSPACE_SRGB,
>                 .depth          = { 16 },
> @@ -670,7 +663,6 @@ static int fimc_lite_enum_fmt(struct file *file, void *priv,
>                 return -EINVAL;
>
>         fmt = &fimc_lite_formats[f->index];
> -       strscpy(f->description, fmt->name, sizeof(f->description));
>         f->pixelformat = fmt->fourcc;
>
>         return 0;
> diff --git a/drivers/media/platform/exynos4-is/fimc-m2m.c b/drivers/media/platform/exynos4-is/fimc-m2m.c
> index 62e876fc3555..c70c2cbe3eb1 100644
> --- a/drivers/media/platform/exynos4-is/fimc-m2m.c
> +++ b/drivers/media/platform/exynos4-is/fimc-m2m.c
> @@ -247,7 +247,6 @@ static int fimc_m2m_enum_fmt(struct file *file, void *priv,
>         if (!fmt)
>                 return -EINVAL;
>
> -       strscpy(f->description, fmt->name, sizeof(f->description));
>         f->pixelformat = fmt->fourcc;
>         return 0;
>  }
> diff --git a/drivers/media/platform/m2m-deinterlace.c b/drivers/media/platform/m2m-deinterlace.c
> index beb7fd7442fb..e9310eeec6cf 100644
> --- a/drivers/media/platform/m2m-deinterlace.c
> +++ b/drivers/media/platform/m2m-deinterlace.c
> @@ -37,7 +37,6 @@ module_param(debug, bool, 0644);
>         v4l2_dbg(1, debug, &dev->v4l2_dev, "%s: " fmt, __func__, ## arg)
>
>  struct deinterlace_fmt {
> -       char    *name;
>         u32     fourcc;
>         /* Types the format can be used for */
>         u32     types;
> @@ -45,12 +44,10 @@ struct deinterlace_fmt {
>
>  static struct deinterlace_fmt formats[] = {
>         {
> -               .name   = "YUV 4:2:0 Planar",
>                 .fourcc = V4L2_PIX_FMT_YUV420,
>                 .types  = MEM2MEM_CAPTURE | MEM2MEM_OUTPUT,
>         },
>         {
> -               .name   = "YUYV 4:2:2",
>                 .fourcc = V4L2_PIX_FMT_YUYV,
>                 .types  = MEM2MEM_CAPTURE | MEM2MEM_OUTPUT,
>         },
> @@ -470,7 +467,6 @@ static int enum_fmt(struct v4l2_fmtdesc *f, u32 type)
>         if (i < NUM_FORMATS) {
>                 /* Format found */
>                 fmt = &formats[i];
> -               strscpy(f->description, fmt->name, sizeof(f->description));
>                 f->pixelformat = fmt->fourcc;
>                 return 0;
>         }
> diff --git a/drivers/media/platform/marvell-ccic/mcam-core.c b/drivers/media/platform/marvell-ccic/mcam-core.c
> index dc30c48d4671..30ac454e702e 100644
> --- a/drivers/media/platform/marvell-ccic/mcam-core.c
> +++ b/drivers/media/platform/marvell-ccic/mcam-core.c
> @@ -98,56 +98,48 @@ MODULE_PARM_DESC(buffer_mode,
>         container_of(notifier, struct mcam_camera, notifier)
>
>  static struct mcam_format_struct {
> -       __u8 *desc;
>         __u32 pixelformat;
>         int bpp;   /* Bytes per pixel */
>         bool planar;
>         u32 mbus_code;
>  } mcam_formats[] = {
>         {
> -               .desc           = "YUYV 4:2:2",
>                 .pixelformat    = V4L2_PIX_FMT_YUYV,
>                 .mbus_code      = MEDIA_BUS_FMT_YUYV8_2X8,
>                 .bpp            = 2,
>                 .planar         = false,
>         },
>         {
> -               .desc           = "YVYU 4:2:2",
>                 .pixelformat    = V4L2_PIX_FMT_YVYU,
>                 .mbus_code      = MEDIA_BUS_FMT_YUYV8_2X8,
>                 .bpp            = 2,
>                 .planar         = false,
>         },
>         {
> -               .desc           = "YUV 4:2:0 PLANAR",
>                 .pixelformat    = V4L2_PIX_FMT_YUV420,
>                 .mbus_code      = MEDIA_BUS_FMT_YUYV8_2X8,
>                 .bpp            = 1,
>                 .planar         = true,
>         },
>         {
> -               .desc           = "YVU 4:2:0 PLANAR",
>                 .pixelformat    = V4L2_PIX_FMT_YVU420,
>                 .mbus_code      = MEDIA_BUS_FMT_YUYV8_2X8,
>                 .bpp            = 1,
>                 .planar         = true,
>         },
>         {
> -               .desc           = "XRGB 444",
>                 .pixelformat    = V4L2_PIX_FMT_XRGB444,
>                 .mbus_code      = MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE,
>                 .bpp            = 2,
>                 .planar         = false,
>         },
>         {
> -               .desc           = "RGB 565",
>                 .pixelformat    = V4L2_PIX_FMT_RGB565,
>                 .mbus_code      = MEDIA_BUS_FMT_RGB565_2X8_LE,
>                 .bpp            = 2,
>                 .planar         = false,
>         },
>         {
> -               .desc           = "Raw RGB Bayer",
>                 .pixelformat    = V4L2_PIX_FMT_SBGGR8,
>                 .mbus_code      = MEDIA_BUS_FMT_SBGGR8_1X8,
>                 .bpp            = 1,
> @@ -1369,8 +1361,6 @@ static int mcam_vidioc_enum_fmt_vid_cap(struct file *filp,
>  {
>         if (fmt->index >= N_MCAM_FMTS)
>                 return -EINVAL;
> -       strscpy(fmt->description, mcam_formats[fmt->index].desc,
> -               sizeof(fmt->description));
>         fmt->pixelformat = mcam_formats[fmt->index].pixelformat;
>         return 0;
>  }
> diff --git a/drivers/media/platform/mx2_emmaprp.c b/drivers/media/platform/mx2_emmaprp.c
> index 333324c75027..4d4225ab1589 100644
> --- a/drivers/media/platform/mx2_emmaprp.c
> +++ b/drivers/media/platform/mx2_emmaprp.c
> @@ -145,7 +145,6 @@ module_param(debug, bool, 0644);
>  #define PRP_INTR_ST_CH2OVF     (1 << 8)
>
>  struct emmaprp_fmt {
> -       char    *name;
>         u32     fourcc;
>         /* Types the format can be used for */
>         u32     types;
> @@ -153,12 +152,10 @@ struct emmaprp_fmt {
>
>  static struct emmaprp_fmt formats[] = {
>         {
> -               .name   = "YUV 4:2:0 Planar",
>                 .fourcc = V4L2_PIX_FMT_YUV420,
>                 .types  = MEM2MEM_CAPTURE,
>         },
>         {
> -               .name   = "4:2:2, packed, YUYV",
>                 .fourcc = V4L2_PIX_FMT_YUYV,
>                 .types  = MEM2MEM_OUTPUT,
>         },
> @@ -409,7 +406,6 @@ static int enum_fmt(struct v4l2_fmtdesc *f, u32 type)
>         if (i < NUM_FORMATS) {
>                 /* Format found */
>                 fmt = &formats[i];
> -               strscpy(f->description, fmt->name, sizeof(f->description) - 1);
>                 f->pixelformat = fmt->fourcc;
>                 return 0;
>         }
> diff --git a/drivers/media/platform/omap/omap_vout.c b/drivers/media/platform/omap/omap_vout.c
> index cb6a9e3946b6..1f6742536c46 100644
> --- a/drivers/media/platform/omap/omap_vout.c
> +++ b/drivers/media/platform/omap/omap_vout.c
> @@ -114,14 +114,12 @@ static const struct v4l2_fmtdesc omap_formats[] = {
>                  *      Byte 0                    Byte 1
>                  *      g2 g1 g0 b4 b3 b2 b1 b0   r4 r3 r2 r1 r0 g5 g4 g3
>                  */
> -               .description = "RGB565, le",
>                 .pixelformat = V4L2_PIX_FMT_RGB565,
>         },
>         {
>                 /* Note:  V4L2 defines RGB32 as: RGB-8-8-8-8  we use
>                  *  this for RGB24 unpack mode, the last 8 bits are ignored
>                  * */
> -               .description = "RGB32, le",
>                 .pixelformat = V4L2_PIX_FMT_RGB32,
>         },
>         {
> @@ -129,15 +127,12 @@ static const struct v4l2_fmtdesc omap_formats[] = {
>                  *        this for RGB24 packed mode
>                  *
>                  */
> -               .description = "RGB24, le",
>                 .pixelformat = V4L2_PIX_FMT_RGB24,
>         },
>         {
> -               .description = "YUYV (YUV 4:2:2), packed",
>                 .pixelformat = V4L2_PIX_FMT_YUYV,
>         },
>         {
> -               .description = "UYVY, packed",
>                 .pixelformat = V4L2_PIX_FMT_UYVY,
>         },
>  };
> @@ -1060,8 +1055,6 @@ static int vidioc_enum_fmt_vid_out(struct file *file, void *fh,
>                 return -EINVAL;
>
>         fmt->flags = omap_formats[index].flags;
> -       strscpy(fmt->description, omap_formats[index].description,
> -               sizeof(fmt->description));
>         fmt->pixelformat = omap_formats[index].pixelformat;
>
>         return 0;
> diff --git a/drivers/media/platform/s3c-camif/camif-capture.c b/drivers/media/platform/s3c-camif/camif-capture.c
> index c3fc94ef251e..93813d593a1d 100644
> --- a/drivers/media/platform/s3c-camif/camif-capture.c
> +++ b/drivers/media/platform/s3c-camif/camif-capture.c
> @@ -688,10 +688,7 @@ static int s3c_camif_vidioc_enum_fmt(struct file *file, void *priv,
>         if (!fmt)
>                 return -EINVAL;
>
> -       strscpy(f->description, fmt->name, sizeof(f->description));
>         f->pixelformat = fmt->fourcc;
> -
> -       pr_debug("fmt(%d): %s\n", f->index, f->description);
>         return 0;
>  }
>
> @@ -805,10 +802,10 @@ static int s3c_camif_vidioc_s_fmt(struct file *file, void *priv,
>         if (vp->owner == NULL)
>                 vp->owner = priv;
>
> -       pr_debug("%ux%u. payload: %u. fmt: %s. %d %d. sizeimage: %d. bpl: %d\n",
> -               out_frame->f_width, out_frame->f_height, vp->payload, fmt->name,
> -               pix->width * pix->height * fmt->depth, fmt->depth,
> -               pix->sizeimage, pix->bytesperline);
> +       pr_debug("%ux%u. payload: %u. fmt: 0x%08x. %d %d. sizeimage: %d. bpl: %d\n",
> +                out_frame->f_width, out_frame->f_height, vp->payload,
> +                fmt->fourcc, pix->width * pix->height * fmt->depth,
> +                fmt->depth, pix->sizeimage, pix->bytesperline);
>
>         return 0;
>  }
> diff --git a/drivers/media/platform/s3c-camif/camif-core.c b/drivers/media/platform/s3c-camif/camif-core.c
> index b05ce0149ca1..f0acd6edcbba 100644
> --- a/drivers/media/platform/s3c-camif/camif-core.c
> +++ b/drivers/media/platform/s3c-camif/camif-core.c
> @@ -42,7 +42,6 @@ static char *camif_clocks[CLK_MAX_NUM] = {
>
>  static const struct camif_fmt camif_formats[] = {
>         {
> -               .name           = "YUV 4:2:2 planar, Y/Cb/Cr",
>                 .fourcc         = V4L2_PIX_FMT_YUV422P,
>                 .depth          = 16,
>                 .ybpp           = 1,
> @@ -51,7 +50,6 @@ static const struct camif_fmt camif_formats[] = {
>                 .flags          = FMT_FL_S3C24XX_CODEC |
>                                   FMT_FL_S3C64XX,
>         }, {
> -               .name           = "YUV 4:2:0 planar, Y/Cb/Cr",
>                 .fourcc         = V4L2_PIX_FMT_YUV420,
>                 .depth          = 12,
>                 .ybpp           = 1,
> @@ -60,7 +58,6 @@ static const struct camif_fmt camif_formats[] = {
>                 .flags          = FMT_FL_S3C24XX_CODEC |
>                                   FMT_FL_S3C64XX,
>         }, {
> -               .name           = "YVU 4:2:0 planar, Y/Cr/Cb",
>                 .fourcc         = V4L2_PIX_FMT_YVU420,
>                 .depth          = 12,
>                 .ybpp           = 1,
> @@ -69,7 +66,6 @@ static const struct camif_fmt camif_formats[] = {
>                 .flags          = FMT_FL_S3C24XX_CODEC |
>                                   FMT_FL_S3C64XX,
>         }, {
> -               .name           = "RGB565, 16 bpp",
>                 .fourcc         = V4L2_PIX_FMT_RGB565X,
>                 .depth          = 16,
>                 .ybpp           = 2,
> @@ -78,7 +74,6 @@ static const struct camif_fmt camif_formats[] = {
>                 .flags          = FMT_FL_S3C24XX_PREVIEW |
>                                   FMT_FL_S3C64XX,
>         }, {
> -               .name           = "XRGB8888, 32 bpp",
>                 .fourcc         = V4L2_PIX_FMT_RGB32,
>                 .depth          = 32,
>                 .ybpp           = 4,
> @@ -87,7 +82,6 @@ static const struct camif_fmt camif_formats[] = {
>                 .flags          = FMT_FL_S3C24XX_PREVIEW |
>                                   FMT_FL_S3C64XX,
>         }, {
> -               .name           = "BGR666",
>                 .fourcc         = V4L2_PIX_FMT_BGR666,
>                 .depth          = 32,
>                 .ybpp           = 4,
> diff --git a/drivers/media/platform/s3c-camif/camif-core.h b/drivers/media/platform/s3c-camif/camif-core.h
> index be5e7357dffc..b3e7ddd313f2 100644
> --- a/drivers/media/platform/s3c-camif/camif-core.h
> +++ b/drivers/media/platform/s3c-camif/camif-core.h
> @@ -92,7 +92,6 @@ enum img_fmt {
>   * @ybpp:      number of luminance bytes per pixel
>   */
>  struct camif_fmt {
> -       char *name;
>         u32 fourcc;
>         u32 color;
>         u16 colplanes;
> diff --git a/drivers/media/platform/s5p-g2d/g2d.c b/drivers/media/platform/s5p-g2d/g2d.c
> index 152d192d5c3f..0c41bfcace7b 100644
> --- a/drivers/media/platform/s5p-g2d/g2d.c
> +++ b/drivers/media/platform/s5p-g2d/g2d.c
> @@ -29,31 +29,26 @@
>
>  static struct g2d_fmt formats[] = {
>         {
> -               .name   = "XRGB_8888",
>                 .fourcc = V4L2_PIX_FMT_RGB32,
>                 .depth  = 32,
>                 .hw     = COLOR_MODE(ORDER_XRGB, MODE_XRGB_8888),
>         },
>         {
> -               .name   = "RGB_565",
>                 .fourcc = V4L2_PIX_FMT_RGB565X,
>                 .depth  = 16,
>                 .hw     = COLOR_MODE(ORDER_XRGB, MODE_RGB_565),
>         },
>         {
> -               .name   = "XRGB_1555",
>                 .fourcc = V4L2_PIX_FMT_RGB555X,
>                 .depth  = 16,
>                 .hw     = COLOR_MODE(ORDER_XRGB, MODE_XRGB_1555),
>         },
>         {
> -               .name   = "XRGB_4444",
>                 .fourcc = V4L2_PIX_FMT_RGB444,
>                 .depth  = 16,
>                 .hw     = COLOR_MODE(ORDER_XRGB, MODE_XRGB_4444),
>         },
>         {
> -               .name   = "PACKED_RGB_888",
>                 .fourcc = V4L2_PIX_FMT_RGB24,
>                 .depth  = 24,
>                 .hw     = COLOR_MODE(ORDER_XRGB, MODE_PACKED_RGB_888),
> @@ -308,7 +303,6 @@ static int vidioc_enum_fmt(struct file *file, void *prv, struct v4l2_fmtdesc *f)
>                 return -EINVAL;
>         fmt = &formats[f->index];
>         f->pixelformat = fmt->fourcc;
> -       strscpy(f->description, fmt->name, sizeof(f->description));
>         return 0;
>  }
>
> diff --git a/drivers/media/platform/s5p-g2d/g2d.h b/drivers/media/platform/s5p-g2d/g2d.h
> index def0ec0dabeb..c2309c1370da 100644
> --- a/drivers/media/platform/s5p-g2d/g2d.h
> +++ b/drivers/media/platform/s5p-g2d/g2d.h
> @@ -61,7 +61,6 @@ struct g2d_ctx {
>  };
>
>  struct g2d_fmt {
> -       char    *name;
>         u32     fourcc;
>         int     depth;
>         u32     hw;
> diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c
> index 8cc730eccb6c..8b9f0cfd6c9d 100644
> --- a/drivers/media/platform/s5p-jpeg/jpeg-core.c
> +++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c
> @@ -38,7 +38,6 @@
>
>  static struct s5p_jpeg_fmt sjpeg_formats[] = {
>         {
> -               .name           = "JPEG JFIF",
>                 .fourcc         = V4L2_PIX_FMT_JPEG,
>                 .flags          = SJPEG_FMT_FLAG_ENC_CAPTURE |
>                                   SJPEG_FMT_FLAG_DEC_OUTPUT |
> @@ -47,7 +46,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>                                   SJPEG_FMT_FLAG_EXYNOS4,
>         },
>         {
> -               .name           = "YUV 4:2:2 packed, YCbYCr",
>                 .fourcc         = V4L2_PIX_FMT_YUYV,
>                 .depth          = 16,
>                 .colplanes      = 1,
> @@ -60,7 +58,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>                 .subsampling    = V4L2_JPEG_CHROMA_SUBSAMPLING_422,
>         },
>         {
> -               .name           = "YUV 4:2:2 packed, YCbYCr",
>                 .fourcc         = V4L2_PIX_FMT_YUYV,
>                 .depth          = 16,
>                 .colplanes      = 1,
> @@ -73,7 +70,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>                 .subsampling    = V4L2_JPEG_CHROMA_SUBSAMPLING_422,
>         },
>         {
> -               .name           = "YUV 4:2:2 packed, YCbYCr",
>                 .fourcc         = V4L2_PIX_FMT_YUYV,
>                 .depth          = 16,
>                 .colplanes      = 1,
> @@ -86,7 +82,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>                 .subsampling    = V4L2_JPEG_CHROMA_SUBSAMPLING_422,
>         },
>         {
> -               .name           = "YUV 4:2:2 packed, YCrYCb",
>                 .fourcc         = V4L2_PIX_FMT_YVYU,
>                 .depth          = 16,
>                 .colplanes      = 1,
> @@ -99,7 +94,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>                 .subsampling    = V4L2_JPEG_CHROMA_SUBSAMPLING_422,
>         },
>         {
> -               .name           = "YUV 4:2:2 packed, YCrYCb",
>                 .fourcc         = V4L2_PIX_FMT_YVYU,
>                 .depth          = 16,
>                 .colplanes      = 1,
> @@ -112,7 +106,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>                 .subsampling    = V4L2_JPEG_CHROMA_SUBSAMPLING_422,
>         },
>         {
> -               .name           = "YUV 4:2:2 packed, YCrYCb",
>                 .fourcc         = V4L2_PIX_FMT_UYVY,
>                 .depth          = 16,
>                 .colplanes      = 1,
> @@ -125,7 +118,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>                 .subsampling    = V4L2_JPEG_CHROMA_SUBSAMPLING_422,
>         },
>         {
> -               .name           = "YUV 4:2:2 packed, YCrYCb",
>                 .fourcc         = V4L2_PIX_FMT_VYUY,
>                 .depth          = 16,
>                 .colplanes      = 1,
> @@ -138,7 +130,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>                 .subsampling    = V4L2_JPEG_CHROMA_SUBSAMPLING_422,
>         },
>         {
> -               .name           = "RGB565",
>                 .fourcc         = V4L2_PIX_FMT_RGB565,
>                 .depth          = 16,
>                 .colplanes      = 1,
> @@ -151,7 +142,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>                 .subsampling    = V4L2_JPEG_CHROMA_SUBSAMPLING_444,
>         },
>         {
> -               .name           = "RGB565",
>                 .fourcc         = V4L2_PIX_FMT_RGB565,
>                 .depth          = 16,
>                 .colplanes      = 1,
> @@ -164,7 +154,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>                 .subsampling    = V4L2_JPEG_CHROMA_SUBSAMPLING_444,
>         },
>         {
> -               .name           = "RGB565X",
>                 .fourcc         = V4L2_PIX_FMT_RGB565X,
>                 .depth          = 16,
>                 .colplanes      = 1,
> @@ -177,7 +166,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>                 .subsampling    = V4L2_JPEG_CHROMA_SUBSAMPLING_444,
>         },
>         {
> -               .name           = "RGB565",
>                 .fourcc         = V4L2_PIX_FMT_RGB565,
>                 .depth          = 16,
>                 .colplanes      = 1,
> @@ -189,7 +177,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>                 .subsampling    = V4L2_JPEG_CHROMA_SUBSAMPLING_444,
>         },
>         {
> -               .name           = "ARGB8888, 32 bpp",
>                 .fourcc         = V4L2_PIX_FMT_RGB32,
>                 .depth          = 32,
>                 .colplanes      = 1,
> @@ -202,7 +189,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>                 .subsampling    = V4L2_JPEG_CHROMA_SUBSAMPLING_444,
>         },
>         {
> -               .name           = "ARGB8888, 32 bpp",
>                 .fourcc         = V4L2_PIX_FMT_RGB32,
>                 .depth          = 32,
>                 .colplanes      = 1,
> @@ -215,7 +201,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>                 .subsampling    = V4L2_JPEG_CHROMA_SUBSAMPLING_444,
>         },
>         {
> -               .name           = "YUV 4:4:4 planar, Y/CbCr",
>                 .fourcc         = V4L2_PIX_FMT_NV24,
>                 .depth          = 24,
>                 .colplanes      = 2,
> @@ -228,7 +213,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>                 .subsampling    = V4L2_JPEG_CHROMA_SUBSAMPLING_444,
>         },
>         {
> -               .name           = "YUV 4:4:4 planar, Y/CrCb",
>                 .fourcc         = V4L2_PIX_FMT_NV42,
>                 .depth          = 24,
>                 .colplanes      = 2,
> @@ -241,7 +225,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>                 .subsampling    = V4L2_JPEG_CHROMA_SUBSAMPLING_444,
>         },
>         {
> -               .name           = "YUV 4:2:2 planar, Y/CrCb",
>                 .fourcc         = V4L2_PIX_FMT_NV61,
>                 .depth          = 16,
>                 .colplanes      = 2,
> @@ -254,7 +237,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>                 .subsampling    = V4L2_JPEG_CHROMA_SUBSAMPLING_422,
>         },
>         {
> -               .name           = "YUV 4:2:2 planar, Y/CbCr",
>                 .fourcc         = V4L2_PIX_FMT_NV16,
>                 .depth          = 16,
>                 .colplanes      = 2,
> @@ -267,7 +249,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>                 .subsampling    = V4L2_JPEG_CHROMA_SUBSAMPLING_422,
>         },
>         {
> -               .name           = "YUV 4:2:0 planar, Y/CbCr",
>                 .fourcc         = V4L2_PIX_FMT_NV12,
>                 .depth          = 12,
>                 .colplanes      = 2,
> @@ -280,7 +261,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>                 .subsampling    = V4L2_JPEG_CHROMA_SUBSAMPLING_420,
>         },
>         {
> -               .name           = "YUV 4:2:0 planar, Y/CbCr",
>                 .fourcc         = V4L2_PIX_FMT_NV12,
>                 .depth          = 12,
>                 .colplanes      = 2,
> @@ -293,7 +273,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>                 .subsampling    = V4L2_JPEG_CHROMA_SUBSAMPLING_420,
>         },
>         {
> -               .name           = "YUV 4:2:0 planar, Y/CbCr",
>                 .fourcc         = V4L2_PIX_FMT_NV12,
>                 .depth          = 12,
>                 .colplanes      = 2,
> @@ -306,7 +285,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>                 .subsampling    = V4L2_JPEG_CHROMA_SUBSAMPLING_420,
>         },
>         {
> -               .name           = "YUV 4:2:0 planar, Y/CrCb",
>                 .fourcc         = V4L2_PIX_FMT_NV21,
>                 .depth          = 12,
>                 .colplanes      = 2,
> @@ -319,7 +297,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>                 .subsampling    = V4L2_JPEG_CHROMA_SUBSAMPLING_420,
>         },
>         {
> -               .name           = "YUV 4:2:0 planar, Y/CrCb",
>                 .fourcc         = V4L2_PIX_FMT_NV21,
>                 .depth          = 12,
>                 .colplanes      = 2,
> @@ -333,7 +310,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>                 .subsampling    = V4L2_JPEG_CHROMA_SUBSAMPLING_420,
>         },
>         {
> -               .name           = "YUV 4:2:0 contiguous 3-planar, Y/Cb/Cr",
>                 .fourcc         = V4L2_PIX_FMT_YUV420,
>                 .depth          = 12,
>                 .colplanes      = 3,
> @@ -346,7 +322,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>                 .subsampling    = V4L2_JPEG_CHROMA_SUBSAMPLING_420,
>         },
>         {
> -               .name           = "YUV 4:2:0 contiguous 3-planar, Y/Cb/Cr",
>                 .fourcc         = V4L2_PIX_FMT_YUV420,
>                 .depth          = 12,
>                 .colplanes      = 3,
> @@ -359,7 +334,6 @@ static struct s5p_jpeg_fmt sjpeg_formats[] = {
>                 .subsampling    = V4L2_JPEG_CHROMA_SUBSAMPLING_420,
>         },
>         {
> -               .name           = "Gray",
>                 .fourcc         = V4L2_PIX_FMT_GREY,
>                 .depth          = 8,
>                 .colplanes      = 1,
> @@ -1317,7 +1291,6 @@ static int enum_fmt(struct s5p_jpeg_ctx *ctx,
>         if (i >= n)
>                 return -EINVAL;
>
> -       strscpy(f->description, sjpeg_formats[i].name, sizeof(f->description));
>         f->pixelformat = sjpeg_formats[i].fourcc;
>
>         return 0;
> diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.h b/drivers/media/platform/s5p-jpeg/jpeg-core.h
> index 144c102ff05f..7fabe743e6dd 100644
> --- a/drivers/media/platform/s5p-jpeg/jpeg-core.h
> +++ b/drivers/media/platform/s5p-jpeg/jpeg-core.h
> @@ -153,7 +153,6 @@ struct s5p_jpeg_variant {
>
>  /**
>   * struct jpeg_fmt - driver's internal color format data
> - * @name:      format description
>   * @fourcc:    the fourcc code, 0 if not applicable
>   * @depth:     number of bits per pixel
>   * @colplanes: number of color planes (1 for packed formats)
> @@ -162,7 +161,6 @@ struct s5p_jpeg_variant {
>   * @flags:     flags describing format applicability
>   */
>  struct s5p_jpeg_fmt {
> -       char    *name;
>         u32     fourcc;
>         int     depth;
>         int     colplanes;
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> index 5dc086516360..96d1ecd1521b 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> @@ -718,7 +718,6 @@ struct s5p_mfc_ctx {
>   *                     used by the MFC
>   */
>  struct s5p_mfc_fmt {
> -       char *name;
>         u32 fourcc;
>         u32 codec_mode;
>         enum s5p_mfc_fmt_type type;
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> index 4017c8b471f4..e7f186f90894 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> @@ -29,7 +29,6 @@
>
>  static struct s5p_mfc_fmt formats[] = {
>         {
> -               .name           = "4:2:0 2 Planes 16x16 Tiles",
>                 .fourcc         = V4L2_PIX_FMT_NV12MT_16X16,
>                 .codec_mode     = S5P_MFC_CODEC_NONE,
>                 .type           = MFC_FMT_RAW,
> @@ -37,7 +36,6 @@ static struct s5p_mfc_fmt formats[] = {
>                 .versions       = MFC_V6_BIT | MFC_V7_BIT,
>         },
>         {
> -               .name           = "4:2:0 2 Planes 64x32 Tiles",
>                 .fourcc         = V4L2_PIX_FMT_NV12MT,
>                 .codec_mode     = S5P_MFC_CODEC_NONE,
>                 .type           = MFC_FMT_RAW,
> @@ -45,7 +43,6 @@ static struct s5p_mfc_fmt formats[] = {
>                 .versions       = MFC_V5_BIT,
>         },
>         {
> -               .name           = "4:2:0 2 Planes Y/CbCr",
>                 .fourcc         = V4L2_PIX_FMT_NV12M,
>                 .codec_mode     = S5P_MFC_CODEC_NONE,
>                 .type           = MFC_FMT_RAW,
> @@ -53,7 +50,6 @@ static struct s5p_mfc_fmt formats[] = {
>                 .versions       = MFC_V6PLUS_BITS,
>         },
>         {
> -               .name           = "4:2:0 2 Planes Y/CrCb",
>                 .fourcc         = V4L2_PIX_FMT_NV21M,
>                 .codec_mode     = S5P_MFC_CODEC_NONE,
>                 .type           = MFC_FMT_RAW,
> @@ -61,7 +57,6 @@ static struct s5p_mfc_fmt formats[] = {
>                 .versions       = MFC_V6PLUS_BITS,
>         },
>         {
> -               .name           = "H264 Encoded Stream",
>                 .fourcc         = V4L2_PIX_FMT_H264,
>                 .codec_mode     = S5P_MFC_CODEC_H264_DEC,
>                 .type           = MFC_FMT_DEC,
> @@ -69,7 +64,6 @@ static struct s5p_mfc_fmt formats[] = {
>                 .versions       = MFC_V5PLUS_BITS,
>         },
>         {
> -               .name           = "H264/MVC Encoded Stream",
>                 .fourcc         = V4L2_PIX_FMT_H264_MVC,
>                 .codec_mode     = S5P_MFC_CODEC_H264_MVC_DEC,
>                 .type           = MFC_FMT_DEC,
> @@ -77,7 +71,6 @@ static struct s5p_mfc_fmt formats[] = {
>                 .versions       = MFC_V6PLUS_BITS,
>         },
>         {
> -               .name           = "H263 Encoded Stream",
>                 .fourcc         = V4L2_PIX_FMT_H263,
>                 .codec_mode     = S5P_MFC_CODEC_H263_DEC,
>                 .type           = MFC_FMT_DEC,
> @@ -85,7 +78,6 @@ static struct s5p_mfc_fmt formats[] = {
>                 .versions       = MFC_V5PLUS_BITS,
>         },
>         {
> -               .name           = "MPEG1 Encoded Stream",
>                 .fourcc         = V4L2_PIX_FMT_MPEG1,
>                 .codec_mode     = S5P_MFC_CODEC_MPEG2_DEC,
>                 .type           = MFC_FMT_DEC,
> @@ -93,7 +85,6 @@ static struct s5p_mfc_fmt formats[] = {
>                 .versions       = MFC_V5PLUS_BITS,
>         },
>         {
> -               .name           = "MPEG2 Encoded Stream",
>                 .fourcc         = V4L2_PIX_FMT_MPEG2,
>                 .codec_mode     = S5P_MFC_CODEC_MPEG2_DEC,
>                 .type           = MFC_FMT_DEC,
> @@ -101,7 +92,6 @@ static struct s5p_mfc_fmt formats[] = {
>                 .versions       = MFC_V5PLUS_BITS,
>         },
>         {
> -               .name           = "MPEG4 Encoded Stream",
>                 .fourcc         = V4L2_PIX_FMT_MPEG4,
>                 .codec_mode     = S5P_MFC_CODEC_MPEG4_DEC,
>                 .type           = MFC_FMT_DEC,
> @@ -109,7 +99,6 @@ static struct s5p_mfc_fmt formats[] = {
>                 .versions       = MFC_V5PLUS_BITS,
>         },
>         {
> -               .name           = "XviD Encoded Stream",
>                 .fourcc         = V4L2_PIX_FMT_XVID,
>                 .codec_mode     = S5P_MFC_CODEC_MPEG4_DEC,
>                 .type           = MFC_FMT_DEC,
> @@ -117,7 +106,6 @@ static struct s5p_mfc_fmt formats[] = {
>                 .versions       = MFC_V5PLUS_BITS,
>         },
>         {
> -               .name           = "VC1 Encoded Stream",
>                 .fourcc         = V4L2_PIX_FMT_VC1_ANNEX_G,
>                 .codec_mode     = S5P_MFC_CODEC_VC1_DEC,
>                 .type           = MFC_FMT_DEC,
> @@ -125,7 +113,6 @@ static struct s5p_mfc_fmt formats[] = {
>                 .versions       = MFC_V5PLUS_BITS,
>         },
>         {
> -               .name           = "VC1 RCV Encoded Stream",
>                 .fourcc         = V4L2_PIX_FMT_VC1_ANNEX_L,
>                 .codec_mode     = S5P_MFC_CODEC_VC1RCV_DEC,
>                 .type           = MFC_FMT_DEC,
> @@ -133,7 +120,6 @@ static struct s5p_mfc_fmt formats[] = {
>                 .versions       = MFC_V5PLUS_BITS,
>         },
>         {
> -               .name           = "VP8 Encoded Stream",
>                 .fourcc         = V4L2_PIX_FMT_VP8,
>                 .codec_mode     = S5P_MFC_CODEC_VP8_DEC,
>                 .type           = MFC_FMT_DEC,
> @@ -297,7 +283,6 @@ static int vidioc_enum_fmt(struct file *file, struct v4l2_fmtdesc *f,
>         if (i == ARRAY_SIZE(formats))
>                 return -EINVAL;
>         fmt = &formats[i];
> -       strscpy(f->description, fmt->name, sizeof(f->description));
>         f->pixelformat = fmt->fourcc;
>         return 0;
>  }
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
> index 97e76480e942..d33c03b0a1d4 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
> @@ -32,7 +32,6 @@
>
>  static struct s5p_mfc_fmt formats[] = {
>         {
> -               .name           = "4:2:0 2 Planes 16x16 Tiles",
>                 .fourcc         = V4L2_PIX_FMT_NV12MT_16X16,
>                 .codec_mode     = S5P_MFC_CODEC_NONE,
>                 .type           = MFC_FMT_RAW,
> @@ -40,7 +39,6 @@ static struct s5p_mfc_fmt formats[] = {
>                 .versions       = MFC_V6_BIT | MFC_V7_BIT,
>         },
>         {
> -               .name           = "4:2:0 2 Planes 64x32 Tiles",
>                 .fourcc         = V4L2_PIX_FMT_NV12MT,
>                 .codec_mode     = S5P_MFC_CODEC_NONE,
>                 .type           = MFC_FMT_RAW,
> @@ -48,7 +46,6 @@ static struct s5p_mfc_fmt formats[] = {
>                 .versions       = MFC_V5_BIT,
>         },
>         {
> -               .name           = "4:2:0 2 Planes Y/CbCr",
>                 .fourcc         = V4L2_PIX_FMT_NV12M,
>                 .codec_mode     = S5P_MFC_CODEC_NONE,
>                 .type           = MFC_FMT_RAW,
> @@ -56,7 +53,6 @@ static struct s5p_mfc_fmt formats[] = {
>                 .versions       = MFC_V5PLUS_BITS,
>         },
>         {
> -               .name           = "4:2:0 2 Planes Y/CrCb",
>                 .fourcc         = V4L2_PIX_FMT_NV21M,
>                 .codec_mode     = S5P_MFC_CODEC_NONE,
>                 .type           = MFC_FMT_RAW,
> @@ -64,7 +60,6 @@ static struct s5p_mfc_fmt formats[] = {
>                 .versions       = MFC_V6PLUS_BITS,
>         },
>         {
> -               .name           = "H264 Encoded Stream",
>                 .fourcc         = V4L2_PIX_FMT_H264,
>                 .codec_mode     = S5P_MFC_CODEC_H264_ENC,
>                 .type           = MFC_FMT_ENC,
> @@ -72,7 +67,6 @@ static struct s5p_mfc_fmt formats[] = {
>                 .versions       = MFC_V5PLUS_BITS,
>         },
>         {
> -               .name           = "MPEG4 Encoded Stream",
>                 .fourcc         = V4L2_PIX_FMT_MPEG4,
>                 .codec_mode     = S5P_MFC_CODEC_MPEG4_ENC,
>                 .type           = MFC_FMT_ENC,
> @@ -80,7 +74,6 @@ static struct s5p_mfc_fmt formats[] = {
>                 .versions       = MFC_V5PLUS_BITS,
>         },
>         {
> -               .name           = "H263 Encoded Stream",
>                 .fourcc         = V4L2_PIX_FMT_H263,
>                 .codec_mode     = S5P_MFC_CODEC_H263_ENC,
>                 .type           = MFC_FMT_ENC,
> @@ -88,7 +81,6 @@ static struct s5p_mfc_fmt formats[] = {
>                 .versions       = MFC_V5PLUS_BITS,
>         },
>         {
> -               .name           = "VP8 Encoded Stream",
>                 .fourcc         = V4L2_PIX_FMT_VP8,
>                 .codec_mode     = S5P_MFC_CODEC_VP8_ENC,
>                 .type           = MFC_FMT_ENC,
> @@ -1333,8 +1325,6 @@ static int vidioc_enum_fmt(struct file *file, struct v4l2_fmtdesc *f,
>
>                 if (j == f->index) {
>                         fmt = &formats[i];
> -                       strscpy(f->description, fmt->name,
> -                               sizeof(f->description));
>                         f->pixelformat = fmt->fourcc;
>                         return 0;
>                 }
> diff --git a/drivers/media/platform/sh_veu.c b/drivers/media/platform/sh_veu.c
> index 5a9ba05c996e..26360af2325e 100644
> --- a/drivers/media/platform/sh_veu.c
> +++ b/drivers/media/platform/sh_veu.c
> @@ -86,7 +86,6 @@ struct sh_veu_file {
>  };
>
>  struct sh_veu_format {
> -       char *name;
>         u32 fourcc;
>         unsigned int depth;
>         unsigned int ydepth;
> @@ -144,14 +143,14 @@ enum sh_veu_fmt_idx {
>   * aligned for NV24.
>   */
>  static const struct sh_veu_format sh_veu_fmt[] = {
> -       [SH_VEU_FMT_NV12]   = { .ydepth = 8, .depth = 12, .name = "NV12", .fourcc = V4L2_PIX_FMT_NV12 },
> -       [SH_VEU_FMT_NV16]   = { .ydepth = 8, .depth = 16, .name = "NV16", .fourcc = V4L2_PIX_FMT_NV16 },
> -       [SH_VEU_FMT_NV24]   = { .ydepth = 8, .depth = 24, .name = "NV24", .fourcc = V4L2_PIX_FMT_NV24 },
> -       [SH_VEU_FMT_RGB332] = { .ydepth = 8, .depth = 8, .name = "RGB332", .fourcc = V4L2_PIX_FMT_RGB332 },
> -       [SH_VEU_FMT_RGB444] = { .ydepth = 16, .depth = 16, .name = "RGB444", .fourcc = V4L2_PIX_FMT_RGB444 },
> -       [SH_VEU_FMT_RGB565] = { .ydepth = 16, .depth = 16, .name = "RGB565", .fourcc = V4L2_PIX_FMT_RGB565 },
> -       [SH_VEU_FMT_RGB666] = { .ydepth = 32, .depth = 32, .name = "BGR666", .fourcc = V4L2_PIX_FMT_BGR666 },
> -       [SH_VEU_FMT_RGB24]  = { .ydepth = 24, .depth = 24, .name = "RGB24", .fourcc = V4L2_PIX_FMT_RGB24 },
> +       [SH_VEU_FMT_NV12]   = { .ydepth = 8, .depth = 12, .fourcc = V4L2_PIX_FMT_NV12 },
> +       [SH_VEU_FMT_NV16]   = { .ydepth = 8, .depth = 16, .fourcc = V4L2_PIX_FMT_NV16 },
> +       [SH_VEU_FMT_NV24]   = { .ydepth = 8, .depth = 24, .fourcc = V4L2_PIX_FMT_NV24 },
> +       [SH_VEU_FMT_RGB332] = { .ydepth = 8, .depth = 8, .fourcc = V4L2_PIX_FMT_RGB332 },
> +       [SH_VEU_FMT_RGB444] = { .ydepth = 16, .depth = 16, .fourcc = V4L2_PIX_FMT_RGB444 },
> +       [SH_VEU_FMT_RGB565] = { .ydepth = 16, .depth = 16, .fourcc = V4L2_PIX_FMT_RGB565 },
> +       [SH_VEU_FMT_RGB666] = { .ydepth = 32, .depth = 32, .fourcc = V4L2_PIX_FMT_BGR666 },
> +       [SH_VEU_FMT_RGB24]  = { .ydepth = 24, .depth = 24, .fourcc = V4L2_PIX_FMT_RGB24 },
>  };
>
>  #define DEFAULT_IN_VFMT (struct sh_veu_vfmt){                                          \
> @@ -359,8 +358,6 @@ static int sh_veu_enum_fmt(struct v4l2_fmtdesc *f, const int *fmt, int fmt_num)
>         if (f->index >= fmt_num)
>                 return -EINVAL;
>
> -       strscpy(f->description, sh_veu_fmt[fmt[f->index]].name,
> -               sizeof(f->description));
>         f->pixelformat = sh_veu_fmt[fmt[f->index]].fourcc;
>         return 0;
>  }
> diff --git a/drivers/media/platform/sh_vou.c b/drivers/media/platform/sh_vou.c
> index 5799aa4b9323..4fc1b4e11b70 100644
> --- a/drivers/media/platform/sh_vou.c
> +++ b/drivers/media/platform/sh_vou.c
> @@ -138,7 +138,6 @@ static void sh_vou_reg_ab_set(struct sh_vou_device *vou_dev, unsigned int reg,
>
>  struct sh_vou_fmt {
>         u32             pfmt;
> -       char            *desc;
>         unsigned char   bpp;
>         unsigned char   bpl;
>         unsigned char   rgb;
> @@ -152,7 +151,6 @@ static struct sh_vou_fmt vou_fmt[] = {
>                 .pfmt   = V4L2_PIX_FMT_NV12,
>                 .bpp    = 12,
>                 .bpl    = 1,
> -               .desc   = "YVU420 planar",
>                 .yf     = 0,
>                 .rgb    = 0,
>         },
> @@ -160,7 +158,6 @@ static struct sh_vou_fmt vou_fmt[] = {
>                 .pfmt   = V4L2_PIX_FMT_NV16,
>                 .bpp    = 16,
>                 .bpl    = 1,
> -               .desc   = "YVYU planar",
>                 .yf     = 1,
>                 .rgb    = 0,
>         },
> @@ -168,7 +165,6 @@ static struct sh_vou_fmt vou_fmt[] = {
>                 .pfmt   = V4L2_PIX_FMT_RGB24,
>                 .bpp    = 24,
>                 .bpl    = 3,
> -               .desc   = "RGB24",
>                 .pkf    = 2,
>                 .rgb    = 1,
>         },
> @@ -176,7 +172,6 @@ static struct sh_vou_fmt vou_fmt[] = {
>                 .pfmt   = V4L2_PIX_FMT_RGB565,
>                 .bpp    = 16,
>                 .bpl    = 2,
> -               .desc   = "RGB565",
>                 .pkf    = 3,
>                 .rgb    = 1,
>         },
> @@ -184,7 +179,6 @@ static struct sh_vou_fmt vou_fmt[] = {
>                 .pfmt   = V4L2_PIX_FMT_RGB565X,
>                 .bpp    = 16,
>                 .bpl    = 2,
> -               .desc   = "RGB565 byteswapped",
>                 .pkf    = 3,
>                 .rgb    = 1,
>         },
> @@ -398,9 +392,6 @@ static int sh_vou_enum_fmt_vid_out(struct file *file, void  *priv,
>
>         dev_dbg(vou_dev->v4l2_dev.dev, "%s()\n", __func__);
>
> -       fmt->type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
> -       strscpy(fmt->description, vou_fmt[fmt->index].desc,
> -               sizeof(fmt->description));
>         fmt->pixelformat = vou_fmt[fmt->index].pfmt;
>
>         return 0;
> @@ -494,7 +485,8 @@ static void sh_vou_configure_geometry(struct sh_vou_device *vou_dev,
>         if (h_idx)
>                 vouvcr |= (1 << 14) | vou_scale_v_fld[h_idx - 1];
>
> -       dev_dbg(vou_dev->v4l2_dev.dev, "%s: scaling 0x%x\n", fmt->desc, vouvcr);
> +       dev_dbg(vou_dev->v4l2_dev.dev, "0x%08x: scaling 0x%x\n",
> +               fmt->pfmt, vouvcr);
>
>         /* To produce a colour bar for testing set bit 23 of VOUVCR */
>         sh_vou_reg_ab_write(vou_dev, VOUVCR, vouvcr);
> diff --git a/drivers/media/platform/ti-vpe/vpe.c b/drivers/media/platform/ti-vpe/vpe.c
> index 3f90f9413da1..a23eeba52723 100644
> --- a/drivers/media/platform/ti-vpe/vpe.c
> +++ b/drivers/media/platform/ti-vpe/vpe.c
> @@ -227,7 +227,6 @@ static const struct vpe_port_data port_data[11] = {
>
>  /* driver info for each of the supported video formats */
>  struct vpe_fmt {
> -       char    *name;                  /* human-readable name */
>         u32     fourcc;                 /* standard format identifier */
>         u8      types;                  /* CAPTURE and/or OUTPUT */
>         u8      coplanar;               /* set for unpacked Luma and Chroma */
> @@ -237,7 +236,6 @@ struct vpe_fmt {
>
>  static struct vpe_fmt vpe_formats[] = {
>         {
> -               .name           = "NV16 YUV 422 co-planar",
>                 .fourcc         = V4L2_PIX_FMT_NV16,
>                 .types          = VPE_FMT_TYPE_CAPTURE | VPE_FMT_TYPE_OUTPUT,
>                 .coplanar       = 1,
> @@ -246,7 +244,6 @@ static struct vpe_fmt vpe_formats[] = {
>                                   },
>         },
>         {
> -               .name           = "NV12 YUV 420 co-planar",
>                 .fourcc         = V4L2_PIX_FMT_NV12,
>                 .types          = VPE_FMT_TYPE_CAPTURE | VPE_FMT_TYPE_OUTPUT,
>                 .coplanar       = 1,
> @@ -255,7 +252,6 @@ static struct vpe_fmt vpe_formats[] = {
>                                   },
>         },
>         {
> -               .name           = "YUYV 422 packed",
>                 .fourcc         = V4L2_PIX_FMT_YUYV,
>                 .types          = VPE_FMT_TYPE_CAPTURE | VPE_FMT_TYPE_OUTPUT,
>                 .coplanar       = 0,
> @@ -263,7 +259,6 @@ static struct vpe_fmt vpe_formats[] = {
>                                   },
>         },
>         {
> -               .name           = "UYVY 422 packed",
>                 .fourcc         = V4L2_PIX_FMT_UYVY,
>                 .types          = VPE_FMT_TYPE_CAPTURE | VPE_FMT_TYPE_OUTPUT,
>                 .coplanar       = 0,
> @@ -271,7 +266,6 @@ static struct vpe_fmt vpe_formats[] = {
>                                   },
>         },
>         {
> -               .name           = "RGB888 packed",
>                 .fourcc         = V4L2_PIX_FMT_RGB24,
>                 .types          = VPE_FMT_TYPE_CAPTURE,
>                 .coplanar       = 0,
> @@ -279,7 +273,6 @@ static struct vpe_fmt vpe_formats[] = {
>                                   },
>         },
>         {
> -               .name           = "ARGB32",
>                 .fourcc         = V4L2_PIX_FMT_RGB32,
>                 .types          = VPE_FMT_TYPE_CAPTURE,
>                 .coplanar       = 0,
> @@ -287,7 +280,6 @@ static struct vpe_fmt vpe_formats[] = {
>                                   },
>         },
>         {
> -               .name           = "BGR888 packed",
>                 .fourcc         = V4L2_PIX_FMT_BGR24,
>                 .types          = VPE_FMT_TYPE_CAPTURE,
>                 .coplanar       = 0,
> @@ -295,7 +287,6 @@ static struct vpe_fmt vpe_formats[] = {
>                                   },
>         },
>         {
> -               .name           = "ABGR32",
>                 .fourcc         = V4L2_PIX_FMT_BGR32,
>                 .types          = VPE_FMT_TYPE_CAPTURE,
>                 .coplanar       = 0,
> @@ -303,7 +294,6 @@ static struct vpe_fmt vpe_formats[] = {
>                                   },
>         },
>         {
> -               .name           = "RGB565",
>                 .fourcc         = V4L2_PIX_FMT_RGB565,
>                 .types          = VPE_FMT_TYPE_CAPTURE,
>                 .coplanar       = 0,
> @@ -311,7 +301,6 @@ static struct vpe_fmt vpe_formats[] = {
>                                   },
>         },
>         {
> -               .name           = "RGB5551",
>                 .fourcc         = V4L2_PIX_FMT_RGB555,
>                 .types          = VPE_FMT_TYPE_CAPTURE,
>                 .coplanar       = 0,
> @@ -1517,7 +1506,6 @@ static int __enum_fmt(struct v4l2_fmtdesc *f, u32 type)
>         if (!fmt)
>                 return -EINVAL;
>
> -       strscpy(f->description, fmt->name, sizeof(f->description));
>         f->pixelformat = fmt->fourcc;
>         return 0;
>  }
> diff --git a/drivers/media/platform/via-camera.c b/drivers/media/platform/via-camera.c
> index 038de7a2027a..d5f811820be9 100644
> --- a/drivers/media/platform/via-camera.c
> +++ b/drivers/media/platform/via-camera.c
> @@ -142,13 +142,11 @@ static struct via_camera *via_cam_info;
>   * now this information must be managed at this level too.
>   */
>  static struct via_format {
> -       __u8 *desc;
>         __u32 pixelformat;
>         int bpp;   /* Bytes per pixel */
>         u32 mbus_code;
>  } via_formats[] = {
>         {
> -               .desc           = "YUYV 4:2:2",
>                 .pixelformat    = V4L2_PIX_FMT_YUYV,
>                 .mbus_code      = MEDIA_BUS_FMT_YUYV8_2X8,
>                 .bpp            = 2,
> @@ -860,8 +858,6 @@ static int viacam_enum_fmt_vid_cap(struct file *filp, void *priv,
>  {
>         if (fmt->index >= N_VIA_FMTS)
>                 return -EINVAL;
> -       strscpy(fmt->description, via_formats[fmt->index].desc,
> -               sizeof(fmt->description));
>         fmt->pixelformat = via_formats[fmt->index].pixelformat;
>         return 0;
>  }
> diff --git a/drivers/media/platform/xilinx/xilinx-dma.c b/drivers/media/platform/xilinx/xilinx-dma.c
> index c9d5fdb2d407..7bd2600cdc9a 100644
> --- a/drivers/media/platform/xilinx/xilinx-dma.c
> +++ b/drivers/media/platform/xilinx/xilinx-dma.c
> @@ -524,8 +524,6 @@ xvip_dma_enum_format(struct file *file, void *fh, struct v4l2_fmtdesc *f)
>                 return -EINVAL;
>
>         f->pixelformat = dma->format.pixelformat;
> -       strscpy(f->description, dma->fmtinfo->description,
> -               sizeof(f->description));
>
>         return 0;
>  }
> diff --git a/drivers/media/platform/xilinx/xilinx-vip.c b/drivers/media/platform/xilinx/xilinx-vip.c
> index 08a825c3a3f6..6ad61b08a31a 100644
> --- a/drivers/media/platform/xilinx/xilinx-vip.c
> +++ b/drivers/media/platform/xilinx/xilinx-vip.c
> @@ -25,21 +25,21 @@
>
>  static const struct xvip_video_format xvip_video_formats[] = {
>         { XVIP_VF_YUV_422, 8, NULL, MEDIA_BUS_FMT_UYVY8_1X16,
> -         2, V4L2_PIX_FMT_YUYV, "4:2:2, packed, YUYV" },
> +         2, V4L2_PIX_FMT_YUYV },
>         { XVIP_VF_YUV_444, 8, NULL, MEDIA_BUS_FMT_VUY8_1X24,
> -         3, V4L2_PIX_FMT_YUV444, "4:4:4, packed, YUYV" },
> +         3, V4L2_PIX_FMT_YUV444 },
>         { XVIP_VF_RBG, 8, NULL, MEDIA_BUS_FMT_RBG888_1X24,
> -         3, 0, NULL },
> +         3, 0 },
>         { XVIP_VF_MONO_SENSOR, 8, "mono", MEDIA_BUS_FMT_Y8_1X8,
> -         1, V4L2_PIX_FMT_GREY, "Greyscale 8-bit" },
> +         1, V4L2_PIX_FMT_GREY },
>         { XVIP_VF_MONO_SENSOR, 8, "rggb", MEDIA_BUS_FMT_SRGGB8_1X8,
> -         1, V4L2_PIX_FMT_SRGGB8, "Bayer 8-bit RGGB" },
> +         1, V4L2_PIX_FMT_SRGGB8 },
>         { XVIP_VF_MONO_SENSOR, 8, "grbg", MEDIA_BUS_FMT_SGRBG8_1X8,
> -         1, V4L2_PIX_FMT_SGRBG8, "Bayer 8-bit GRBG" },
> +         1, V4L2_PIX_FMT_SGRBG8 },
>         { XVIP_VF_MONO_SENSOR, 8, "gbrg", MEDIA_BUS_FMT_SGBRG8_1X8,
> -         1, V4L2_PIX_FMT_SGBRG8, "Bayer 8-bit GBRG" },
> +         1, V4L2_PIX_FMT_SGBRG8 },
>         { XVIP_VF_MONO_SENSOR, 8, "bggr", MEDIA_BUS_FMT_SBGGR8_1X8,
> -         1, V4L2_PIX_FMT_SBGGR8, "Bayer 8-bit BGGR" },
> +         1, V4L2_PIX_FMT_SBGGR8 },
>  };
>
>  /**
> diff --git a/drivers/media/platform/xilinx/xilinx-vip.h b/drivers/media/platform/xilinx/xilinx-vip.h
> index ba939dd52818..47da39211ae4 100644
> --- a/drivers/media/platform/xilinx/xilinx-vip.h
> +++ b/drivers/media/platform/xilinx/xilinx-vip.h
> @@ -108,7 +108,6 @@ struct xvip_device {
>   * @code: media bus format code
>   * @bpp: bytes per pixel (when stored in memory)
>   * @fourcc: V4L2 pixel format FCC identifier
> - * @description: format description, suitable for userspace
>   */
>  struct xvip_video_format {
>         unsigned int vf_code;
> @@ -117,7 +116,6 @@ struct xvip_video_format {
>         unsigned int code;
>         unsigned int bpp;
>         u32 fourcc;
> -       const char *description;
>  };
>
>  const struct xvip_video_format *xvip_get_format_by_code(unsigned int code);
> diff --git a/include/media/drv-intf/exynos-fimc.h b/include/media/drv-intf/exynos-fimc.h
> index 54c214737142..bb846e167325 100644
> --- a/include/media/drv-intf/exynos-fimc.h
> +++ b/include/media/drv-intf/exynos-fimc.h
> @@ -90,7 +90,6 @@ struct fimc_source_info {
>  /**
>   * struct fimc_fmt - color format data structure
>   * @mbus_code: media bus pixel code, -1 if not applicable
> - * @name: format description
>   * @fourcc: fourcc code for this format, 0 if not applicable
>   * @color: the driver's private color format id
>   * @memplanes: number of physically non-contiguous data planes
> @@ -102,7 +101,6 @@ struct fimc_source_info {
>   */
>  struct fimc_fmt {
>         u32 mbus_code;
> -       char    *name;
>         u32     fourcc;
>         u32     color;
>         u16     memplanes;
> --
> 2.20.1
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-07-01  7:41 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-26 11:27 [PATCH 0/5] media: let v4l2-ioctl set the format description Hans Verkuil
2019-06-26 11:27 ` [PATCH 1/5] v4l2-ioctl: add missing pixelformats Hans Verkuil
2019-06-26 16:31   ` Laurent Pinchart
2019-06-26 16:50     ` Hans Verkuil
2019-06-26 11:27 ` [PATCH 2/5] media/usb: don't set description in ENUM_FMT Hans Verkuil
2019-06-26 11:27 ` [PATCH 3/5] media/pci: don't set description for ENUM_FMT Hans Verkuil
2019-06-26 11:27 ` [PATCH 4/5] drivers/staging/media: " Hans Verkuil
2019-06-26 16:55   ` Laurent Pinchart
2019-06-26 11:27 ` [PATCH 5/5] media/platform: don't set description in ENUM_FMT Hans Verkuil
2019-06-26 14:36   ` Benoit Parrot
2019-06-26 17:08   ` Laurent Pinchart
2019-07-01  7:40   ` Lad, Prabhakar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).