Changeset 70452dd4 in mainline
- Timestamp:
- 2011-05-28T21:26:40Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3ef91c88
- Parents:
- bf793bf
- Location:
- uspace/lib/usbdev
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdev/include/usb/dev/driver.h
rbf793bf r70452dd4 168 168 int usb_device_destroy_pipes(ddf_dev_t *, usb_endpoint_mapping_t *, size_t); 169 169 int usb_device_create(ddf_dev_t *, usb_endpoint_description_t **, usb_device_t **, const char **); 170 void usb_device_destroy(usb_device_t *); 170 171 171 172 size_t usb_interface_count_alternates(uint8_t *, size_t, uint8_t); -
uspace/lib/usbdev/src/devdrv.c
rbf793bf r70452dd4 533 533 } 534 534 535 /** Destroy instance of a USB device. 536 * 537 * @param dev Device to be destroyed. 538 */ 539 void usb_device_destroy(usb_device_t *dev) 540 { 541 if (dev == NULL) { 542 return; 543 } 544 545 /* Ignore errors and hope for the best. */ 546 usb_device_destroy_pipes(dev->ddf_dev, dev->pipes, dev->pipes_count); 547 if (dev->descriptors.configuration != NULL) { 548 free(dev->descriptors.configuration); 549 } 550 551 if (dev->alternate_interfaces != NULL) { 552 if (dev->alternate_interfaces->alternatives != NULL) { 553 free(dev->alternate_interfaces->alternatives); 554 } 555 free(dev->alternate_interfaces); 556 } 557 558 free(dev); 559 } 560 535 561 /** 536 562 * @}
Note:
See TracChangeset
for help on using the changeset viewer.