From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C3740299929; Mon, 13 Apr 2026 17:02:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776099746; cv=none; b=ifH5EzHhadI4XNuDebVRgFuI81o/JbMaCVgCjamd1x5m+btZssfcg8zHvoO+NEpZZvf9j/PAa7vK1jncrGSStvomNINty09M5LGEpSuH8uJgsv2kow3+6am/gcFrPTQcbzh8uvm6WWdh3v4ObH7kZH+RgQfWUxp5XPGP+MP9CZc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776099746; c=relaxed/simple; bh=1TvWQW+tcW/6bD1riYR7kzOJzmqiCoGmnrgN87rYGxc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fstnEnMqpvrN1jcubyY7eV974FwAfBZT6smsHNiJo2nSwhVN5papLI37cnhQzng7gwEudBVRuLVpELRLaiF3zTECMwCqN45LXeEKRQ4ux8mjZaUa2PvGo9ItTzKbbQuU4xt3aW3dn+LM3H13HQaZvby+ncnLWkonG76sx2+24yQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mAyPp2J7; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="mAyPp2J7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5AF65C2BCAF; Mon, 13 Apr 2026 17:02:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1776099746; bh=1TvWQW+tcW/6bD1riYR7kzOJzmqiCoGmnrgN87rYGxc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mAyPp2J7CHiGxpi2inM5kAg4yDgeb1CljX2LJ9YGc/rPv2tVQzn3XtUWOPs7qUvYH aIu3YUlpjjT9BwrhIb3exrDkeeiBZkVcUjWxYIZU8U2KfuVl1AZ1ZrrdsHoHSyP6O4 RTe6EMfq+cQJ1fKssaWYvURqjjDxa8B7uBaZ6q50= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Ricardo Ribalda , Laurent Pinchart , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.10 426/491] media: uvcvideo: Allow extra entities Date: Mon, 13 Apr 2026 18:01:11 +0200 Message-ID: <20260413155834.976642542@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260413155819.042779211@linuxfoundation.org> References: <20260413155819.042779211@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ricardo Ribalda [ Upstream commit cae79e50d1222010fde8c522410c315f74d35c40 ] Increase the size of the id, to avoid collisions with entities implemented by the driver that are not part of the UVC device. Entities exposed by the UVC device use IDs 0-255, extra entities implemented by the driver (such as the GPIO entity) use IDs 256 and up. Signed-off-by: Ricardo Ribalda Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab Stable-dep-of: 0e2ee70291e6 ("media: uvcvideo: Mark invalid entities with id UVC_INVALID_ENTITY_ID") Signed-off-by: Sasha Levin --- drivers/media/usb/uvc/uvc_driver.c | 2 +- drivers/media/usb/uvc/uvcvideo.h | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c index 15202269194ad..e1d3e753e80ed 100644 --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c @@ -1037,7 +1037,7 @@ static const u8 uvc_media_transport_input_guid[16] = UVC_GUID_UVC_MEDIA_TRANSPORT_INPUT; static const u8 uvc_processing_guid[16] = UVC_GUID_UVC_PROCESSING; -static struct uvc_entity *uvc_alloc_entity(u16 type, u8 id, +static struct uvc_entity *uvc_alloc_entity(u16 type, u16 id, unsigned int num_pads, unsigned int extra_size) { struct uvc_entity *entity; diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h index 656ab4d9356c2..0e4209dbf307f 100644 --- a/drivers/media/usb/uvc/uvcvideo.h +++ b/drivers/media/usb/uvc/uvcvideo.h @@ -302,7 +302,12 @@ struct uvc_entity { * chain. */ unsigned int flags; - u8 id; + /* + * Entities exposed by the UVC device use IDs 0-255, extra entities + * implemented by the driver (such as the GPIO entity) use IDs 256 and + * up. + */ + u16 id; u16 type; char name[64]; u8 guid[16]; -- 2.53.0