From patchwork Thu Dec 15 22:45:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Grzeschik X-Patchwork-Id: 13074598 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A41F7C4332F for ; Thu, 15 Dec 2022 22:47:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229990AbiLOWrE (ORCPT ); Thu, 15 Dec 2022 17:47:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230022AbiLOWqs (ORCPT ); Thu, 15 Dec 2022 17:46:48 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CABA4730D for ; Thu, 15 Dec 2022 14:46:41 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p5wzt-0003mI-SE; Thu, 15 Dec 2022 23:46:37 +0100 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1p5wzs-004nK1-2a; Thu, 15 Dec 2022 23:46:36 +0100 Received: from mgr by dude04.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1p5wzr-009pzo-Sf; Thu, 15 Dec 2022 23:46:35 +0100 From: Michael Grzeschik To: laurent.pinchart@ideasonboard.com Cc: gregkh@linuxfoundation.org, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, linux-usb@vger.kernel.org, linux-media@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH v2 0/5] usb: uvc: improve header files and function use Date: Thu, 15 Dec 2022 23:45:09 +0100 Message-Id: <20221215224514.2344656-1-m.grzeschik@pengutronix.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: mgr@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-usb@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org This series is improving the use of the uvc_format_desc in v4l2-uvc.h and also reuses the declarative strings from v4l_fill_fmtdesc. Michael Grzeschik (5): usb: uvc: move media/v4l2-uvc.h to usb/uvc.h usb: uvc: move uvc_fmts and uvc_format_by_guid to own compile unit usb: uvc: make uvc_format_desc table const media: v4l2: move v4l_fill_fmtdesc to common v4l2_fill_fmtdesc function usb: uvc: use v4l2_fill_fmtdesc instead of open coded format name drivers/media/common/Kconfig | 3 + drivers/media/common/Makefile | 1 + drivers/media/common/uvc.c | 179 ++++++++++++ drivers/media/usb/uvc/Kconfig | 1 + drivers/media/usb/uvc/uvc_ctrl.c | 2 +- drivers/media/usb/uvc/uvc_driver.c | 12 +- drivers/media/v4l2-core/v4l2-common.c | 263 +++++++++++++++++ drivers/media/v4l2-core/v4l2-ioctl.c | 264 +----------------- drivers/usb/gadget/Kconfig | 1 + drivers/usb/gadget/function/uvc_v4l2.c | 16 +- include/{media/v4l2-uvc.h => linux/usb/uvc.h} | 206 +------------- include/media/v4l2-common.h | 2 + 12 files changed, 468 insertions(+), 482 deletions(-) create mode 100644 drivers/media/common/uvc.c rename include/{media/v4l2-uvc.h => linux/usb/uvc.h} (59%)