mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 19:36:35 +08:00
USBMSC: Add missing logic to saved device description.
This commit is contained in:
@@ -1719,13 +1719,18 @@ errout_with_lock:
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_USBMSC_COMPOSITE
|
#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 usbdevclass_driver_s **classdev)
|
||||||
{
|
{
|
||||||
FAR struct usbmsc_alloc_s *alloc = (FAR struct usbmsc_alloc_s *)handle;
|
FAR struct usbmsc_alloc_s *alloc = (FAR struct usbmsc_alloc_s *)handle;
|
||||||
int ret;
|
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
|
/* Export the LUNs as with the "standalone" USB mass storage driver, but
|
||||||
* don't register the class instance with the USB device infrastructure.
|
* don't register the class instance with the USB device infrastructure.
|
||||||
|
|||||||
Reference in New Issue
Block a user