Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3000126pxa; Tue, 25 Aug 2020 08:48:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzniMrr2aGXSVvvwP/G2ezWMfWkuEXYAPfhe2vLGSpup51AT30rqHWs1j9g0XAQt+4uLR0B X-Received: by 2002:a17:906:194e:: with SMTP id b14mr8136067eje.86.1598370528039; Tue, 25 Aug 2020 08:48:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598370528; cv=none; d=google.com; s=arc-20160816; b=KUXbfc6QIo5hhkWc0q3cJFBA+aG70Zmw/j64nxy4h69YmsgPJ2lEw2GTAOP+xWdUF3 0Zy28iHAhSy4aFoya32hQBRBKXxGmvUQnZ4MgJ0j8LlqMepI+swaq7QDbu1Z0o2PxtWD /J6180OGT5FlHgYFqDvFKL6ZUFAGmqR/dIMNL5My095YIYrNfFlHExHn+hwWyq2abp/+ 4vIozu5E0y6SlX7ve9D1C2lt6TgQ+hEexpFodp/iXpRr88fJUTryLT6BlH3uHWADpdQG tmx08zMd5x+AhE0XKDUUurodomfBG8ju35gmKEUmq7WKKmEPsS+SSmi/4CX1e6xUPsU9 p+iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=4nbfXZKGbQ0hCTih4Y1W1oe6mP3wKodhidCxqHWhOZU=; b=hkIDpLb6bTdku4mOC9pwwOIXZGm7BzwtBLczUl3kxWlCsHFX0IyQq1yoD1rKiGVUYr XGbdLkcWFXXACr52Sr6wzrk0dFewH5Lv1OodLsuc+J8lulhnHbNtSY2HqBgvEe8ypTjS WKreqvwxbC4cSnpwBjfJTsIzQMdmZ6Xk6Q0THZ6Nw0bCnOimPE/xVIaEoT+GWliVcWZ5 GiDsUyAsc5UKErLna8JsKymtAF6quDKl16vMliHGwgiVMWccsGSQDAE3728SR7QtL5JM X3VGJnEIvtAioLwlSAJl0TSn5sFnMcy5qq0DuwCp8mItxbUZP3Ao6gxvgrIadmEms0zd 4+sA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v7si5274281edf.94.2020.08.25.08.48.24; Tue, 25 Aug 2020 08:48:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726944AbgHYPot (ORCPT + 99 others); Tue, 25 Aug 2020 11:44:49 -0400 Received: from mail1.windriver.com ([147.11.146.13]:47779 "EHLO mail1.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725805AbgHYPos (ORCPT ); Tue, 25 Aug 2020 11:44:48 -0400 Received: from ALA-HCB.corp.ad.wrs.com (ala-hcb.corp.ad.wrs.com [147.11.189.41]) by mail1.windriver.com (8.15.2/8.15.2) with ESMTPS id 07PFieiC001998 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 25 Aug 2020 08:44:40 -0700 (PDT) Received: from pek-lpggp1.wrs.com (128.224.153.74) by ALA-HCB.corp.ad.wrs.com (147.11.189.41) with Microsoft SMTP Server id 14.3.487.0; Tue, 25 Aug 2020 08:44:22 -0700 From: To: CC: , Subject: [PATCH] USB: integrate macro definitions into include/linux/usb.h Date: Tue, 25 Aug 2020 23:44:21 +0800 Message-ID: <20200825154421.5463-1-yanfei.xu@windriver.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yanfei Xu include/linux/usb.h also contains 'Hard limit' and 'Arbitrary limit' macro definitions in it, hence we can integrate these from config.c into include/linux/usb.h Signed-off-by: Yanfei Xu --- drivers/usb/core/config.c | 3 --- include/linux/usb.h | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c index 562a730befda..58c5d946cd86 100644 --- a/drivers/usb/core/config.c +++ b/drivers/usb/core/config.c @@ -14,9 +14,6 @@ #include "usb.h" -#define USB_MAXALTSETTING 128 /* Hard limit */ - -#define USB_MAXCONFIG 8 /* Arbitrary limit */ static inline const char *plural(int n) diff --git a/include/linux/usb.h b/include/linux/usb.h index 20c555db4621..d0a117cfc6bd 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -275,9 +275,12 @@ void usb_put_intf(struct usb_interface *intf); /* Hard limit */ #define USB_MAXENDPOINTS 30 +#define USB_MAXALTSETTING 128 + /* this maximum is arbitrary */ #define USB_MAXINTERFACES 32 #define USB_MAXIADS (USB_MAXINTERFACES/2) +#define USB_MAXCONFIG 8 /* * USB Resume Timer: Every Host controller driver should drive the resume -- 2.18.2