Changeset b5111c46 in mainline for uspace/drv/bus/usb/uhci/hc.c
- Timestamp:
- 2014-07-23T21:38:25Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ffa96c2
- Parents:
- 87a3df7f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/uhci/hc.c
r87a3df7f rb5111c46 230 230 * 231 231 * @param[in] instance Memory place to initialize. 232 * @param[in] HC function node 232 233 * @param[in] regs Range of device's I/O control registers. 233 234 * @param[in] interrupts True if hw interrupts should be used. … … 238 239 * interrupt fibrils. 239 240 */ 240 int hc_init(hc_t *instance, addr_range_t *regs, bool interrupts)241 int hc_init(hc_t *instance, ddf_fun_t *fun, addr_range_t *regs, bool interrupts) 241 242 { 242 243 assert(regs->size >= sizeof(uhci_regs_t)); … … 266 267 } 267 268 268 hcd_init(&instance->generic, USB_SPEED_FULL, 269 instance->generic = ddf_fun_data_alloc(fun, sizeof(hcd_t)); 270 if (instance->generic == NULL) { 271 usb_log_error("Out of memory.\n"); 272 return ENOMEM; 273 } 274 275 hcd_init(instance->generic, USB_SPEED_FULL, 269 276 BANDWIDTH_AVAILABLE_USB11, bandwidth_count_usb11); 270 277 271 instance->generic .private_data = instance;272 instance->generic .schedule = hc_schedule;273 instance->generic .ep_add_hook = NULL;278 instance->generic->private_data = instance; 279 instance->generic->schedule = hc_schedule; 280 instance->generic->ep_add_hook = NULL; 274 281 275 282 hc_init_hw(instance);
Note:
See TracChangeset
for help on using the changeset viewer.