Changeset b4c1c95 in mainline for uspace/lib/usbhost/src/iface.c
- Timestamp:
- 2013-01-04T12:55:23Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- daf199f
- Parents:
- 0816c2e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/src/iface.c
r0816c2e rb4c1c95 42 42 #include "ddf_helpers.h" 43 43 44 /** Calls ep_remove_hook upon endpoint removal. Prints warning.45 * @param ep Endpoint to be unregistered.46 * @param arg hcd_t in disguise.47 */48 static void unregister_helper_warn(endpoint_t *ep, void *arg)49 {50 hcd_t *hcd = arg;51 assert(ep);52 assert(hcd);53 usb_log_warning("Endpoint %d:%d %s was left behind, removing.\n",54 ep->address, ep->endpoint, usb_str_direction(ep->direction));55 if (hcd->ep_remove_hook)56 hcd->ep_remove_hook(hcd, ep);57 }58 59 44 /** Request address interface function. 60 45 * … … 73 58 assert(hcd); 74 59 assert(address); 75 76 60 usb_log_debug("Address request: speed: %s, address: %d, strict: %s.\n", 77 61 usb_str_speed(speed), *address, strict ? "YES" : "NO"); … … 126 110 assert(fun); 127 111 hcd_t *hcd = dev_to_hcd(ddf_fun_get_dev(fun)); 128 assert(hcd);129 112 usb_log_debug("Address release %d.\n", address); 130 usb_endpoint_manager_remove_address(&hcd->ep_manager, address, 131 unregister_helper_warn, hcd); 132 usb_device_manager_release_address(&hcd->dev_manager, address); 133 return EOK; 113 return hcd_release_address(hcd, address); 134 114 } 135 115 … … 197 177 void *arg) 198 178 { 199 return hcd_send_batch(dev_to_hcd(ddf_fun_get_dev(fun)), target, USB_DIRECTION_IN, 200 data, size, setup_data, callback, NULL, arg, "READ"); 179 return hcd_send_batch(dev_to_hcd(ddf_fun_get_dev(fun)), target, 180 USB_DIRECTION_IN, data, size, setup_data, callback, NULL, arg, 181 "READ"); 201 182 } 202 183
Note:
See TracChangeset
for help on using the changeset viewer.