On Mon Sep 28 14:32:01 2026 +0000, Ricardo Ribalda wrote:
> If there are multiple cameras in the system affected by a compliance
> error now we only show an error message for one of them.
> 
> Use uvc_warn_once() to print an error message per device.
> 
> Reviewed-by: Laurent Pinchart <[email protected]>
> Reviewed-by: Hans de Goede <[email protected]>
> Signed-off-by: Ricardo Ribalda <[email protected]>
> Link: 
> https://patch.msgid.link/[email protected]
> Signed-off-by: Hans de Goede <[email protected]>
> Signed-off-by: Laurent Pinchart <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>

Patch committed.

Thanks,
Hans Verkuil

 drivers/media/usb/uvc/uvc_video.c | 2 +-
 drivers/media/usb/uvc/uvcvideo.h  | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

---

diff --git a/drivers/media/usb/uvc/uvc_video.c 
b/drivers/media/usb/uvc/uvc_video.c
index 0167f0f8e846..a92a986ab714 100644
--- a/drivers/media/usb/uvc/uvc_video.c
+++ b/drivers/media/usb/uvc/uvc_video.c
@@ -95,7 +95,7 @@ int uvc_query_ctrl(struct uvc_device *dev, u8 query, u8 unit,
         */
        if (ret > 0 && query != UVC_GET_INFO) {
                memset(data + ret, 0, size - ret);
-               dev_warn_once(&dev->intf->dev,
+               uvc_warn_once(dev, UVC_WARN_QUERY_CTRL,
                              "UVC non compliance: %s control %u on unit %u 
returned %d bytes when we expected %u.\n",
                              uvc_query_name(query), cs, unit, ret, size);
                return 0;
diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h
index 45cce791c56d..af8cef94ffff 100644
--- a/drivers/media/usb/uvc/uvcvideo.h
+++ b/drivers/media/usb/uvc/uvcvideo.h
@@ -660,6 +660,7 @@ static inline struct uvc_fh *to_uvc_fh(struct file *filp)
 #define UVC_WARN_MINMAX                0
 #define UVC_WARN_PROBE_DEF     1
 #define UVC_WARN_XU_GET_RES    2
+#define UVC_WARN_QUERY_CTRL    3
 
 extern unsigned int uvc_clock_param;
 extern unsigned int uvc_no_drop_param;
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to