MCPcopy Create free account
hub / github.com/apache/nuttx / cdcecm_uninitialize

Function cdcecm_uninitialize

drivers/usbdev/cdcecm.c:2023–2043  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2021 ****************************************************************************/
2022
2023void cdcecm_uninitialize(FAR struct usbdevclass_driver_s *classdev)
2024{
2025 FAR struct cdcecm_driver_s *self = (FAR struct cdcecm_driver_s *)classdev;
2026 int ret;
2027
2028 /* Un-register the CDC/ECM netdev device */
2029
2030 ret = netdev_unregister(&self->dev);
2031 if (ret < 0)
2032 {
2033 nerr("ERROR: netdev_unregister failed. ret: %d\n", ret);
2034 }
2035
2036#ifndef CONFIG_CDCECM_COMPOSITE
2037 usbdev_unregister(&self->usbdev);
2038#endif
2039
2040 /* And free the driver structure */
2041
2042 kmm_free(self);
2043}
2044
2045/****************************************************************************
2046 * Public Functions

Callers

nothing calls this directly

Calls 3

netdev_unregisterFunction · 0.85
kmm_freeFunction · 0.85
usbdev_unregisterFunction · 0.50

Tested by

no test coverage detected