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

Function cdcncm_uninitialize

drivers/usbdev/cdcncm.c:3058–3078  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3056 ****************************************************************************/
3057
3058static void cdcncm_uninitialize(FAR struct usbdevclass_driver_s *classdev)
3059{
3060 FAR struct cdcncm_driver_s *self = (FAR struct cdcncm_driver_s *)classdev;
3061 int ret;
3062
3063 /* Un-register the CDC/NCM netdev device */
3064
3065 ret = netdev_lower_unregister(&self->dev);
3066 if (ret < 0)
3067 {
3068 nerr("ERROR: netdev_lower_unregister failed. ret: %d\n", ret);
3069 }
3070
3071#ifndef CONFIG_CDCNCM_COMPOSITE
3072 usbdev_unregister(&self->usbdev);
3073#endif
3074
3075 /* And free the driver structure */
3076
3077 kmm_free(self);
3078}
3079
3080/****************************************************************************
3081 * Name: cdcmbim_uninitialize

Callers

nothing calls this directly

Calls 3

netdev_lower_unregisterFunction · 0.85
kmm_freeFunction · 0.85
usbdev_unregisterFunction · 0.50

Tested by

no test coverage detected