Changeset 45bf63c in mainline for uspace/drv/bus/usb/ohci/ohci_endpoint.c
- Timestamp:
- 2011-10-30T15:35:36Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 20a3465, 3ce78580
- Parents:
- 1737bfb (diff), e978ada (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/ohci_endpoint.c
r1737bfb r45bf63c 62 62 } 63 63 /*----------------------------------------------------------------------------*/ 64 /** Disposes hcd endpoint structure65 *66 * @param[in] hcd_ep endpoint structure67 */68 static void ohci_endpoint_fini(endpoint_t *ep)69 {70 ohci_endpoint_t *instance = ep->hc_data.data;71 hc_dequeue_endpoint(instance->hcd->private_data, ep);72 if (instance) {73 free32(instance->ed);74 free32(instance->td);75 free(instance);76 }77 }78 /*----------------------------------------------------------------------------*/79 64 /** Creates new hcd endpoint representation. 80 65 * 81 66 * @param[in] ep USBD endpoint structure 82 * @return pointer to a new hcd endpoint structure, NULL on failure.67 * @return Error code. 83 68 */ 84 69 int ohci_endpoint_init(hcd_t *hcd, endpoint_t *ep) … … 104 89 ed_init(ohci_ep->ed, ep, ohci_ep->td); 105 90 endpoint_set_hc_data( 106 ep, ohci_ep, ohci_endpoint_fini, ohci_ep_toggle_get, ohci_ep_toggle_set); 107 ohci_ep->hcd = hcd; 91 ep, ohci_ep, ohci_ep_toggle_get, ohci_ep_toggle_set); 108 92 hc_enqueue_endpoint(hcd->private_data, ep); 109 93 return EOK; 94 } 95 /*----------------------------------------------------------------------------*/ 96 /** Disposes hcd endpoint structure 97 * 98 * @param[in] hcd driver using this instance. 99 * @param[in] ep endpoint structure. 100 */ 101 void ohci_endpoint_fini(hcd_t *hcd, endpoint_t *ep) 102 { 103 assert(hcd); 104 assert(ep); 105 ohci_endpoint_t *instance = ohci_endpoint_get(ep); 106 hc_dequeue_endpoint(hcd->private_data, ep); 107 if (instance) { 108 free32(instance->ed); 109 free32(instance->td); 110 free(instance); 111 } 112 endpoint_clear_hc_data(ep); 110 113 } 111 114 /**
Note:
See TracChangeset
for help on using the changeset viewer.