Changes in uspace/drv/ohci/root_hub.c [9014dcd:be11749] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/ohci/root_hub.c
r9014dcd rbe11749 217 217 instance->registers->rh_desc_a |= RHDA_NPS_FLAG; 218 218 instance->unfinished_interrupt_transfer = NULL; 219 instance->interrupt_buffer = malloc((instance->port_count + 8)/8);220 219 usb_log_info("OHCI root hub with %d ports.\n", instance->port_count); 221 220 return EOK; … … 472 471 size_t * buffer_size) { 473 472 int bit_count = instance->port_count + 1; 474 (*buffer_size) = (bit_count +7 / 8);475 476 (*buffer) = instance->interrupt_buffer;//malloc(*buffer_size);473 (*buffer_size) = (bit_count / 8) + ((bit_count % 8 == 0) ? 0 : 1); 474 475 (*buffer) = malloc(*buffer_size); 477 476 uint8_t * bitmap = (uint8_t*) (*buffer); 478 477 uint32_t mask = (1 << (USB_HUB_FEATURE_C_HUB_LOCAL_POWER + 16))
Note:
See TracChangeset
for help on using the changeset viewer.