mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
SAMA5Dx board: Don't register USB classes that are not enabled in the configuration
This commit is contained in:
@@ -312,6 +312,7 @@ int sam_usbhost_initialize(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USBHOST_MSC
|
||||
/* Register theUSB host Mass Storage Class */
|
||||
|
||||
ret = usbhost_storageinit();
|
||||
@@ -319,7 +320,9 @@ int sam_usbhost_initialize(void)
|
||||
{
|
||||
udbg("ERROR: Failed to register the mass storage class: %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USBHOST_HIDKBD
|
||||
/* Register the USB host HID keyboard class driver */
|
||||
|
||||
ret = usbhost_kbdinit();
|
||||
@@ -327,6 +330,7 @@ int sam_usbhost_initialize(void)
|
||||
{
|
||||
udbg("ERROR: Failed to register the KBD class\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Then get an instance of the USB host interface. */
|
||||
|
||||
|
||||
@@ -310,6 +310,7 @@ int sam_usbhost_initialize(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USBHOST_MSC
|
||||
/* Register the USB host Mass Storage Class */
|
||||
|
||||
ret = usbhost_storageinit();
|
||||
@@ -317,7 +318,9 @@ int sam_usbhost_initialize(void)
|
||||
{
|
||||
udbg("ERROR: Failed to register the mass storage class: %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USBHOST_HIDKBD
|
||||
/* Register the USB host HID keyboard class driver */
|
||||
|
||||
ret = usbhost_kbdinit();
|
||||
@@ -325,6 +328,7 @@ int sam_usbhost_initialize(void)
|
||||
{
|
||||
udbg("ERROR: Failed to register the KBD class\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Then get an instance of the USB host interface. */
|
||||
|
||||
|
||||
@@ -311,6 +311,7 @@ int sam_usbhost_initialize(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USBHOST_MSC
|
||||
/* Register the USB host Mass Storage Class */
|
||||
|
||||
ret = usbhost_storageinit();
|
||||
@@ -318,7 +319,9 @@ int sam_usbhost_initialize(void)
|
||||
{
|
||||
udbg("ERROR: Failed to register the mass storage class: %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USBHOST_HIDKBD
|
||||
/* Register the USB host HID keyboard class driver */
|
||||
|
||||
ret = usbhost_kbdinit();
|
||||
@@ -326,6 +329,7 @@ int sam_usbhost_initialize(void)
|
||||
{
|
||||
udbg("ERROR: Failed to register the KBD class\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Then get an instance of the USB host interface. */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user