USBMSC: Add missing logic to saved device description.

This commit is contained in:
Gregory Nutt 2017-07-16 07:00:48 -06:00
parent 0729151d29
commit 5d67ddda4e
1 changed files with 7 additions and 2 deletions

View File

@ -1719,13 +1719,18 @@ errout_with_lock:
****************************************************************************/
#ifdef CONFIG_USBMSC_COMPOSITE
int usbmsc_classobject(FAR void *handle, FAR struct usbdev_description_s *devdesc,
int usbmsc_classobject(FAR void *handle,
FAR struct usbdev_description_s *devdesc,
FAR struct usbdevclass_driver_s **classdev)
{
FAR struct usbmsc_alloc_s *alloc = (FAR struct usbmsc_alloc_s *)handle;
int ret;
DEBUGASSERT(handle && classdev);
DEBUGASSERT(handle != NULL && classdev != NULL);
/* Save the device description */
memcpy(&alloc->dev.devdesc, devdesc, sizeof(struct usbdev_description_s));
/* Export the LUNs as with the "standalone" USB mass storage driver, but
* don't register the class instance with the USB device infrastructure.