Re: [PATCH 1/8] usb: gadget: uvc: use fourcc printk helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Morning Michael

On 23/03/2023 11:41, Michael Tretter wrote:
There is a format helper for printing fourcc codes. Use that one instead
of manually formatting the pixelformat for printing.

Signed-off-by: Michael Tretter <m.tretter@xxxxxxxxxxxxxx>
---


Reviewed-by: Daniel Scally <dan.scally@xxxxxxxxxxxxxxxx>

  drivers/usb/gadget/function/uvc_v4l2.c | 9 +++------
  1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/gadget/function/uvc_v4l2.c b/drivers/usb/gadget/function/uvc_v4l2.c
index 3f0a9795c0d4..13c7ba06f994 100644
--- a/drivers/usb/gadget/function/uvc_v4l2.c
+++ b/drivers/usb/gadget/function/uvc_v4l2.c
@@ -240,16 +240,13 @@ uvc_v4l2_try_format(struct file *file, void *fh, struct v4l2_format *fmt)
  	struct uvc_video *video = &uvc->video;
  	struct uvcg_format *uformat;
  	struct uvcg_frame *uframe;
-	u8 *fcc;
if (fmt->type != video->queue.queue.type)
  		return -EINVAL;
- fcc = (u8 *)&fmt->fmt.pix.pixelformat;
-	uvcg_dbg(&uvc->func, "Trying format 0x%08x (%c%c%c%c): %ux%u\n",
-		fmt->fmt.pix.pixelformat,
-		fcc[0], fcc[1], fcc[2], fcc[3],
-		fmt->fmt.pix.width, fmt->fmt.pix.height);
+	uvcg_dbg(&uvc->func, "Trying format %p4cc: %ux%u\n",
+		 &fmt->fmt.pix.pixelformat,
+		 fmt->fmt.pix.width, fmt->fmt.pix.height);
uformat = find_format_by_pix(uvc, fmt->fmt.pix.pixelformat);
  	if (!uformat)




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux