[PATCH] USB: integrate macro definitions into include/linux/usb.h
From: yanfei.xu
Date: Tue Aug 25 2020 - 11:44:50 EST
From: Yanfei Xu <yanfei.xu@xxxxxxxxxxxxx>
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@xxxxxxxxxxxxx>
---
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