mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 19:36:35 +08:00
Fixes on reverification of USB mass storage class
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4336 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
+39
-1
@@ -2049,7 +2049,6 @@ errout_with_class:
|
||||
int cdcser_initialize(int minor)
|
||||
{
|
||||
FAR struct usbdevclass_driver_s *drvr;
|
||||
FAR struct cdcser_dev_s *priv;
|
||||
int ret;
|
||||
|
||||
/* Get an instance of the serial driver class object */
|
||||
@@ -2068,3 +2067,42 @@ int cdcser_initialize(int minor)
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: cdcser_uninitialize
|
||||
*
|
||||
* Description:
|
||||
* Un-initialize the USB storage class driver
|
||||
*
|
||||
* Input Parameters:
|
||||
* handle - The handle returned by a previous call to cdcser_configure().
|
||||
*
|
||||
* Returned Value:
|
||||
* None
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CONFIG_CDCSER_COMPOSITE
|
||||
void cdcser_uninitialize(FAR struct usbdevclass_driver_s *classdev)
|
||||
{
|
||||
FAR struct cdcser_driver_s *drvr = (FAR struct cdcser_driver_s *)classdev;
|
||||
FAR struct cdcser_dev_s *priv = drvr->dev;
|
||||
|
||||
/* Unbind the class (if still bound) */
|
||||
|
||||
if (priv->usbdev)
|
||||
{
|
||||
cdcser_unbind(Fpriv->usbdev);
|
||||
}
|
||||
|
||||
/* Unregister the driver (unless we are a part of a composite device */
|
||||
|
||||
#ifndef CONFIG_CDCSER_COMPOSITE
|
||||
usbdev_unregister(&alloc->drvr.drvr);
|
||||
#endif
|
||||
|
||||
/* And free the driver structure */
|
||||
|
||||
kfree(priv);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user