Changeset 85c4cc45 in mainline
- Timestamp:
- 2011-11-14T11:01:46Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1b93658
- Parents:
- a066c1b9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/isa/isa.c
ra066c1b9 r85c4cc45 89 89 fibril_mutex_t mutex; 90 90 ddf_fun_t *fnode; 91 hw_resource_t resources[ISA_MAX_HW_RES]; 91 92 hw_resource_list_t hw_resources; 92 93 link_t bus_link; … … 201 202 202 203 fibril_mutex_initialize(&fun->mutex); 204 fun->hw_resources.resources = fun->resources; 205 203 206 fun->fnode = fnode; 204 207 return fun; … … 510 513 } 511 514 512 static void fun_hw_res_alloc(isa_fun_t *fun)513 {514 fun->hw_resources.resources =515 (hw_resource_t *)malloc(sizeof(hw_resource_t) * ISA_MAX_HW_RES);516 }517 518 static void fun_hw_res_free(isa_fun_t *fun)519 {520 free(fun->hw_resources.resources);521 fun->hw_resources.resources = NULL;522 }523 524 515 static char *isa_fun_read_info(char *fun_conf, isa_bus_t *isa) 525 516 { … … 546 537 547 538 isa_fun_t *fun = isa_fun_create(isa, fun_name); 539 free(fun_name); 548 540 if (fun == NULL) { 549 free(fun_name);550 541 return NULL; 551 542 } 552 553 /* Allocate buffer for the list of hardware resources of the device. */554 fun_hw_res_alloc(fun);555 543 556 544 /* Get properties of the device (match ids, irq and io range). */ … … 669 657 list_remove(&fun->bus_link); 670 658 671 fun_hw_res_free(fun);672 659 ddf_fun_destroy(fun->fnode); 673 660 }
Note:
See TracChangeset
for help on using the changeset viewer.