[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200825154421.5463-1-yanfei.xu@windriver.com>
Date: Tue, 25 Aug 2020 23:44:21 +0800
From: <yanfei.xu@...driver.com>
To: <gregkh@...uxfoundation.org>
CC: <linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] USB: integrate macro definitions into include/linux/usb.h
From: Yanfei Xu <yanfei.xu@...driver.com>
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 <yanfei.xu@...driver.com>
---
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
Powered by blists - more mailing lists