SAMA5Dx board: Don't register USB classes that are not enabled in the configuration

This commit is contained in:
Gregory Nutt 2015-05-01 10:52:17 -06:00
parent 299eb14689
commit 0d6070d08b
3 changed files with 12 additions and 0 deletions

View File

@ -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. */

View File

@ -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. */

View File

@ -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. */