Changes in uspace/drv/uhci-hcd/root_hub.c [4abc304:a7e2f0d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/root_hub.c
r4abc304 ra7e2f0d 45 45 46 46 /*----------------------------------------------------------------------------*/ 47 static int usb_iface_get_hc_handle_rh_impl(ddf_fun_t *root_hub_fun, 48 devman_handle_t *handle) 47 /** Gets handle of the respective hc (parent device). 48 * 49 * @param[in] root_hub_fun Root hub function seeking hc handle. 50 * @param[out] handle Place to write the handle. 51 * @return Error code. 52 */ 53 static int usb_iface_get_hc_handle_rh_impl( 54 ddf_fun_t *root_hub_fun, devman_handle_t *handle) 49 55 { 56 /* TODO: Can't this use parent pointer? */ 50 57 ddf_fun_t *hc_fun = root_hub_fun->driver_data; 51 58 assert(hc_fun != NULL); … … 56 63 } 57 64 /*----------------------------------------------------------------------------*/ 58 static int usb_iface_get_address_rh_impl(ddf_fun_t *fun, devman_handle_t handle, 59 usb_address_t *address) 65 /** Gets USB address of the calling device. 66 * 67 * @param[in] fun Root hub function. 68 * @param[in] handle Handle of the device seeking address. 69 * @param[out] address Place to store found address. 70 * @return Error code. 71 */ 72 static int usb_iface_get_address_rh_impl( 73 ddf_fun_t *fun, devman_handle_t handle, usb_address_t *address) 60 74 { 75 /* TODO: What does this do? Is it neccessary? Can't it use implemented 76 * hc function?*/ 61 77 assert(fun); 62 78 ddf_fun_t *hc_fun = fun->driver_data; … … 65 81 assert(hc); 66 82 67 usb_address_t addr = device_keeper_find(&hc->device_manager, 68 handle); 83 usb_address_t addr = device_keeper_find(&hc->device_manager, handle); 69 84 if (addr < 0) { 70 85 return addr; … … 83 98 }; 84 99 /*----------------------------------------------------------------------------*/ 100 /** Gets root hub hw resources. 101 * 102 * @param[in] fun Root hub function. 103 * @return Pointer to the resource list used by the root hub. 104 */ 85 105 static hw_resource_list_t *get_resource_list(ddf_fun_t *dev) 86 106 { … … 91 111 assert(hc); 92 112 93 / /TODO: fix memory leak113 /* TODO: fix memory leak */ 94 114 hw_resource_list_t *resource_list = malloc(sizeof(hw_resource_list_t)); 95 115 assert(resource_list);
Note:
See TracChangeset
for help on using the changeset viewer.