MCPcopy Create free account
hub / github.com/HelenOS/helenos / usb_device_data_alloc

Function usb_device_data_alloc

uspace/lib/usbdev/src/devdrv.c:617–623  ·  view source on GitHub ↗

Allocate driver specific data. * @param usb_dev usb_device structure. * @param size requested data size. * @return Pointer to the newly allocated space, NULL on failure. */

Source from the content-addressed store, hash-verified

615 * @return Pointer to the newly allocated space, NULL on failure.
616 */
617void *usb_device_data_alloc(usb_device_t *usb_dev, size_t size)
618{
619 assert(usb_dev);
620 assert(usb_dev->driver_data == NULL);
621 return usb_dev->driver_data = calloc(1, size);
622
623}
624
625void *usb_device_data_get(usb_device_t *usb_dev)
626{

Callers 5

usb_hid_device_addFunction · 0.85
usbmast_device_addFunction · 0.85
usbdiag_dev_createFunction · 0.85
usb_hub_device_addFunction · 0.85
usbmid_explore_deviceFunction · 0.85

Calls 1

callocFunction · 0.85

Tested by

no test coverage detected