usb: musb: Silence error about blacklisting hubs if !CONFIG_USB
authorPaul Cercueil <paul@crapouillou.net>
Tue, 30 Apr 2019 14:59:35 +0000 (09:59 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Apr 2019 15:55:08 +0000 (17:55 +0200)
Some drivers, like jz4740-musb, don't depend on CONFIG_USB.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/musb/musb_core.c

index b7d56272f9d175065e32fbb784d425714d9eb8fa..9f5a4819a744b8fac33cd7fec540fc8275c81247 100644 (file)
@@ -1497,10 +1497,11 @@ static int musb_core_init(u16 musb_type, struct musb *musb)
        } else {
                musb->is_multipoint = 0;
                type = "";
-#ifndef        CONFIG_USB_OTG_BLACKLIST_HUB
-               pr_err("%s: kernel must blacklist external hubs\n",
-                      musb_driver_name);
-#endif
+               if (IS_ENABLED(CONFIG_USB) &&
+                   !IS_ENABLED(CONFIG_USB_OTG_BLACKLIST_HUB)) {
+                       pr_err("%s: kernel must blacklist external hubs\n",
+                              musb_driver_name);
+               }
        }
 
        /* log release info */