Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp5579233pxb; Mon, 28 Mar 2022 14:29:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxo699L+TVJVt8rvb22O2o5euNdT2e5Zbi04I+uNuWYZt6ld+GtTk+hVQAOMnGrOzpfI5nA X-Received: by 2002:aca:1213:0:b0:2ef:1f7e:3d93 with SMTP id 19-20020aca1213000000b002ef1f7e3d93mr615676ois.177.1648502974423; Mon, 28 Mar 2022 14:29:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648502974; cv=none; d=google.com; s=arc-20160816; b=D/l1HxOvEv4Gb5zXM6jDmdVJv0EnVDxOzuR3CM4OLgmWyFsgwBqCRllcP9vTit9LTv NCGwsrqqSWJKf7q4mZ1HUdG60xTTV+Wz29AyQHDip2NFJtQLFaoYInZAyCefllXE++Q5 DdkHIZdPfQfBNMi/ByRi5DILTL5FeVMJ+D84fbSL1Vx+SNgBdgaIyyaF3qXFYQyMc3tn d7zo6px1VAbt85qRe3JM6rojkHAcTGWlsa5ZbdweJbXskWKMtCsdw0k0Co0wYOo3n3XT tW9g/S2yyVMFBJDnxfUr79zCH2LrvnfPNsjuWxdzzCu7DWR2I940ozNQpmpeBzgjhUsQ MPzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=l+9Q9+EWQxGDNe77BYVGRuzsf5f7Wbe8lMECkdIAGso=; b=X6xGU1UvZVRG0AXYsr78/m1CR9Q7BGxpHB3QzLPsBazZD8EhcOczEEh6608bQMnhbx t8zfgKtcltZSUUhgLGl/UqQZY1JQ31dtXo+eQuVjEjD5/szZCkw5GBgiWK0Z6HdsvFz5 SDLmX/4ME0gHhL1i8WjBE2zS/6tAJ/G0cK2g9Em7hBu5dlZa9qj8voxd1LShbOFd48K+ 9NgBxYhCoeEISfN8b5nSGGT7dHD8/wIo2CFsURLsimwpjGQ1hBRr4PbZ1tYXcwDHelY+ adVvrtdZxxyf1W3qIcV1JSkjslT+z2o1IPBq+tJMRjOpWX1y4oWv5rqWzSLnkRkW7sZf o5dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=ga4yUIhF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id t4-20020a9d66c4000000b005cb2fc137b9si10709696otm.53.2022.03.28.14.29.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Mar 2022 14:29:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=ga4yUIhF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 397DE85BCD; Mon, 28 Mar 2022 14:12:55 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345906AbiC1Ury (ORCPT + 99 others); Mon, 28 Mar 2022 16:47:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345664AbiC1Un0 (ORCPT ); Mon, 28 Mar 2022 16:43:26 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B65666ADB; Mon, 28 Mar 2022 13:41:45 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id DFB42B81202; Mon, 28 Mar 2022 20:41:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94E69C340F0; Mon, 28 Mar 2022 20:41:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648500102; bh=lnro/6UV02jSjWrQ0SysMDI1v1hK0XcwWyaOXFLLFAw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ga4yUIhF+ZsImo7V1iUqWWtmT4e8r0v4nZ+WAItPZD3YIHNxWrDbclbZpQAWavZg1 ubZaoO5+zFPFOxGouyCV4UXLNabCIUyT7stkDuxurwUsSAwR/rDffFG9+4chkdjjt9 YHJ57V1M2VYOArdZATliyVkJ7+TIV8NuHNW8T4pfqqG+52usSGYsuozMLfCZYXwTYC YOclHTKt3+4UgvUpXKKjsls2fsuHewy5q4V6lCrbRhnlCGRUsOxixCbTrc/eMvkisk 5O1xkZzI/vzT9AE729CjVctIfLdIb1eQqe3Qa5pX7uKWl8LTEq/1QiyXSr4tkJBOhC fuSvWRjtDWXMA== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1nYwBI-000lc4-25; Mon, 28 Mar 2022 22:41:40 +0200 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH 04/26] media: dvb-usb: Add helper macros for using USB VID/PID Date: Mon, 28 Mar 2022 22:41:16 +0200 Message-Id: X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In order to use designated initializers and to avoid avoid big lines at the USB ID tables, define some helper macros. Signed-off-by: Mauro Carvalho Chehab --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 00/26] at: https://lore.kernel.org/all/cover.1648499509.git.mchehab@kernel.org/ include/media/dvb-usb-ids.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/media/dvb-usb-ids.h b/include/media/dvb-usb-ids.h index 9577cae8c73b..5ae55c20912e 100644 --- a/include/media/dvb-usb-ids.h +++ b/include/media/dvb-usb-ids.h @@ -10,6 +10,14 @@ #ifndef _DVB_USB_IDS_H_ #define _DVB_USB_IDS_H_ +#include + +#define DVB_USB_DEV(pid, vid) \ + [vid] = { USB_DEVICE(USB_VID_ ## pid, USB_PID_ ## vid) } + +#define DVB_USB_DEV_VER(pid, vid, lo, hi) \ + [vid] = { USB_DEVICE_VER(USB_VID_ ## pid, USB_PID_ ## vid, lo, hi) } + /* Vendor IDs */ #define USB_VID_774 0x7a69 -- 2.35.1