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

Function cdcmbim_uninitialize

drivers/usbdev/cdcncm.c:3102–3125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3100
3101#ifdef CONFIG_NET_CDCMBIM
3102static void cdcmbim_uninitialize(FAR struct usbdevclass_driver_s *classdev)
3103{
3104 FAR struct cdcmbim_driver_s *self =
3105 (FAR struct cdcmbim_driver_s *)classdev;
3106 int ret;
3107
3108 /* Un-register the CDC/MBIM netdev device */
3109
3110 ret = netdev_lower_unregister(&self->ncmdriver.dev);
3111 if (ret < 0)
3112 {
3113 nerr("ERROR: netdev_lower_unregister failed. ret: %d\n", ret);
3114 }
3115
3116# ifndef CONFIG_CDCNCM_COMPOSITE
3117 usbdev_unregister(&self->ncmdriver.usbdev);
3118# endif
3119
3120 /* And free the driver structure */
3121
3122 nxmutex_destroy(&self->lock);
3123 nxsem_destroy(&self->read_sem);
3124 kmm_free(self);
3125}
3126#endif
3127
3128#ifndef CONFIG_CDCNCM_COMPOSITE

Callers

nothing calls this directly

Calls 5

netdev_lower_unregisterFunction · 0.85
nxmutex_destroyFunction · 0.85
nxsem_destroyFunction · 0.85
kmm_freeFunction · 0.85
usbdev_unregisterFunction · 0.50

Tested by

no test coverage detected