This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 528dce4f7f usbdev/adb: fixed adb build issue
528dce4f7f is described below

commit 528dce4f7f37c640db494a58ec959817733e4b7f
Author: zhangyuan21 <zhangyua...@xiaomi.com>
AuthorDate: Sun Feb 26 22:22:26 2023 +0800

    usbdev/adb: fixed adb build issue
    
    Signed-off-by: zhangyuan21 <zhangyua...@xiaomi.com>
---
 drivers/usbdev/adb.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/usbdev/adb.c b/drivers/usbdev/adb.c
index 281cf454e9..7d33573e93 100644
--- a/drivers/usbdev/adb.c
+++ b/drivers/usbdev/adb.c
@@ -1232,10 +1232,12 @@ static int usbclass_setup(FAR struct 
usbdevclass_driver_s *driver,
   uint16_t value;
   uint16_t len;
   int ret = -EOPNOTSUPP;
-  bool cfg_req = true;
 
   FAR struct usbdev_adb_s *priv;
+#ifndef CONFIG_USBADB_COMPOSITE
   FAR struct usbdev_req_s *ctrlreq;
+  bool cfg_req = true;
+#endif
 
 #ifdef CONFIG_DEBUG_FEATURES
   if (!driver || !dev || !dev->ep0 || !ctrl)
@@ -1258,7 +1260,9 @@ static int usbclass_setup(FAR struct usbdevclass_driver_s 
*driver,
     }
 #endif
 
+#ifndef CONFIG_USBADB_COMPOSITE
   ctrlreq = priv->ctrlreq;
+#endif
 
   /* Extract the little-endian 16-bit values to host order */
 
@@ -1365,7 +1369,9 @@ static int usbclass_setup(FAR struct usbdevclass_driver_s 
*driver,
                 if (ctrl->type == 0)
                   {
                     ret = usbclass_setconfig(priv, value);
+#ifndef CONFIG_USBADB_COMPOSITE
                     cfg_req = false;
+#endif
                   }
               }
               break;

Reply via email to