Spark: Need to condition out MSC logic in composite setup if there is no MSC in the composite.

This commit is contained in:
Gregory Nutt 2017-07-15 12:33:10 -06:00
parent 69d3a91ef1
commit 8143563be6
1 changed files with 4 additions and 0 deletions

View File

@ -318,6 +318,7 @@ static int stm32_composite_initialize(void)
* *
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_USBMSC_COMPOSITE
static int board_mscclassobject(int minor, static int board_mscclassobject(int minor,
FAR struct usbdev_description_s *devdesc, FAR struct usbdev_description_s *devdesc,
FAR struct usbdevclass_driver_s **classdev) FAR struct usbdevclass_driver_s **classdev)
@ -363,6 +364,7 @@ static int board_mscclassobject(int minor,
return ret; return ret;
} }
#endif
/**************************************************************************** /****************************************************************************
* Name: board_mscuninitialize * Name: board_mscuninitialize
@ -381,12 +383,14 @@ static int board_mscclassobject(int minor,
* *
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_USBMSC_COMPOSITE
void board_mscuninitialize(FAR struct usbdevclass_driver_s *classdev) void board_mscuninitialize(FAR struct usbdevclass_driver_s *classdev)
{ {
DEBUGASSERT(g_mschandle != NULL); DEBUGASSERT(g_mschandle != NULL);
usbmsc_uninitialize(g_mschandle); usbmsc_uninitialize(g_mschandle);
g_mschandle = NULL; g_mschandle = NULL;
} }
#endif
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions