summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nuttx/drivers/power/max1704x.c2
-rw-r--r--nuttx/drivers/usbdev/cdcacm.c40
-rw-r--r--nuttx/drivers/usbdev/msc_descriptors.c8
-rw-r--r--nuttx/include/nuttx/usb/cdc_serial.h20
-rw-r--r--nuttx/include/nuttx/usb/usbdev.h2
5 files changed, 65 insertions, 7 deletions
diff --git a/nuttx/drivers/power/max1704x.c b/nuttx/drivers/power/max1704x.c
index d442bd8c16..01a66d80c3 100644
--- a/nuttx/drivers/power/max1704x.c
+++ b/nuttx/drivers/power/max1704x.c
@@ -525,7 +525,9 @@ FAR struct battery_dev_s *max1704x_initialize(FAR struct i2c_dev_s *i2c,
uint8_t addr, uint32_t frequency)
{
FAR struct max1704x_dev_s *priv;
+#if 0
int ret;
+#endif
/* Initialize the MAX1704x device structure */
diff --git a/nuttx/drivers/usbdev/cdcacm.c b/nuttx/drivers/usbdev/cdcacm.c
index c203d54155..aeea60ce80 100644
--- a/nuttx/drivers/usbdev/cdcacm.c
+++ b/nuttx/drivers/usbdev/cdcacm.c
@@ -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
diff --git a/nuttx/drivers/usbdev/msc_descriptors.c b/nuttx/drivers/usbdev/msc_descriptors.c
index 467eaced8c..0c86eaba9e 100644
--- a/nuttx/drivers/usbdev/msc_descriptors.c
+++ b/nuttx/drivers/usbdev/msc_descriptors.c
@@ -213,7 +213,7 @@ static const struct usb_epdesc_s g_hsepbulkindesc =
/* Strings ******************************************************************/
#ifndef CONFIG_USBMSC_COMPOSITE
-const char g_msccendorstr[] = CONFIG_USBMSC_VENDORSTR;
+const char g_mscvendorstr[] = CONFIG_USBMSC_VENDORSTR;
const char g_mscproductstr[] = CONFIG_USBMSC_PRODUCTSTR;
const char g_mscserialstr[] = CONFIG_USBMSC_SERIALSTR;
#endif
@@ -256,15 +256,15 @@ int usbmsc_mkstrdesc(uint8_t id, struct usb_strdesc_s *strdesc)
}
case USBMSC_MANUFACTURERSTRID:
- str = g_vendorstr;
+ str = g_mscvendorstr;
break;
case USBMSC_PRODUCTSTRID:
- str = g_productstr;
+ str = g_mscproductstr;
break;
case USBMSC_SERIALSTRID:
- str = g_serialstr;
+ str = g_mscserialstr;
break;
#endif
diff --git a/nuttx/include/nuttx/usb/cdc_serial.h b/nuttx/include/nuttx/usb/cdc_serial.h
index 33ad03bb73..ad2c0e64fb 100644
--- a/nuttx/include/nuttx/usb/cdc_serial.h
+++ b/nuttx/include/nuttx/usb/cdc_serial.h
@@ -1,7 +1,7 @@
/****************************************************************************
* include/nuttx/usb/cdc_serial.h
*
- * Copyright (C) 2011 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -351,6 +351,24 @@ int cdcser_classobject(int minor, FAR struct usbdevclass_driver_s **classdev);
EXTERN int cdcser_initialize(int minor);
+/****************************************************************************
+ * 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
+EXTERN void cdcser_uninitialize(FAR struct usbdevclass_driver_s *classdev);
+#endif
+
#undef EXTERN
#if defined(__cplusplus)
}
diff --git a/nuttx/include/nuttx/usb/usbdev.h b/nuttx/include/nuttx/usb/usbdev.h
index 3f694a5511..00ded57708 100644
--- a/nuttx/include/nuttx/usb/usbdev.h
+++ b/nuttx/include/nuttx/usb/usbdev.h
@@ -282,7 +282,7 @@ struct usbdev_s
{
const struct usbdev_ops_s *ops; /* Access to hardware specific features */
struct usbdev_ep_s *ep0; /* Endpoint zero */
- uint8_t speed; /* Current speed of host connection */
+ uint8_t speed; /* Current speed of the host connection */
uint8_t dualspeed:1; /* 1:supports high and full speed operation */
};