SAMA5Dx board: Don't register USB classes that are not enabled in the configuration
This commit is contained in:
parent
6d526c189d
commit
666b17db33
@ -312,6 +312,7 @@ int sam_usbhost_initialize(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_USBHOST_MSC
|
||||||
/* Register theUSB host Mass Storage Class */
|
/* Register theUSB host Mass Storage Class */
|
||||||
|
|
||||||
ret = usbhost_storageinit();
|
ret = usbhost_storageinit();
|
||||||
@ -319,7 +320,9 @@ int sam_usbhost_initialize(void)
|
|||||||
{
|
{
|
||||||
udbg("ERROR: Failed to register the mass storage class: %d\n", ret);
|
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 */
|
/* Register the USB host HID keyboard class driver */
|
||||||
|
|
||||||
ret = usbhost_kbdinit();
|
ret = usbhost_kbdinit();
|
||||||
@ -327,6 +330,7 @@ int sam_usbhost_initialize(void)
|
|||||||
{
|
{
|
||||||
udbg("ERROR: Failed to register the KBD class\n");
|
udbg("ERROR: Failed to register the KBD class\n");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Then get an instance of the USB host interface. */
|
/* Then get an instance of the USB host interface. */
|
||||||
|
|
||||||
|
@ -310,6 +310,7 @@ int sam_usbhost_initialize(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_USBHOST_MSC
|
||||||
/* Register the USB host Mass Storage Class */
|
/* Register the USB host Mass Storage Class */
|
||||||
|
|
||||||
ret = usbhost_storageinit();
|
ret = usbhost_storageinit();
|
||||||
@ -317,7 +318,9 @@ int sam_usbhost_initialize(void)
|
|||||||
{
|
{
|
||||||
udbg("ERROR: Failed to register the mass storage class: %d\n", ret);
|
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 */
|
/* Register the USB host HID keyboard class driver */
|
||||||
|
|
||||||
ret = usbhost_kbdinit();
|
ret = usbhost_kbdinit();
|
||||||
@ -325,6 +328,7 @@ int sam_usbhost_initialize(void)
|
|||||||
{
|
{
|
||||||
udbg("ERROR: Failed to register the KBD class\n");
|
udbg("ERROR: Failed to register the KBD class\n");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Then get an instance of the USB host interface. */
|
/* Then get an instance of the USB host interface. */
|
||||||
|
|
||||||
|
@ -311,6 +311,7 @@ int sam_usbhost_initialize(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_USBHOST_MSC
|
||||||
/* Register the USB host Mass Storage Class */
|
/* Register the USB host Mass Storage Class */
|
||||||
|
|
||||||
ret = usbhost_storageinit();
|
ret = usbhost_storageinit();
|
||||||
@ -318,7 +319,9 @@ int sam_usbhost_initialize(void)
|
|||||||
{
|
{
|
||||||
udbg("ERROR: Failed to register the mass storage class: %d\n", ret);
|
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 */
|
/* Register the USB host HID keyboard class driver */
|
||||||
|
|
||||||
ret = usbhost_kbdinit();
|
ret = usbhost_kbdinit();
|
||||||
@ -326,6 +329,7 @@ int sam_usbhost_initialize(void)
|
|||||||
{
|
{
|
||||||
udbg("ERROR: Failed to register the KBD class\n");
|
udbg("ERROR: Failed to register the KBD class\n");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Then get an instance of the USB host interface. */
|
/* Then get an instance of the USB host interface. */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user