Changeset 97a62fe in mainline for uspace/drv/isa/isa.c
- Timestamp:
- 2011-02-14T21:41:50Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- cd0684d
- Parents:
- 7df0477e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/isa/isa.c
r7df0477e r97a62fe 106 106 }; 107 107 108 static isa_fun_t *isa_fun_create( )108 static isa_fun_t *isa_fun_create(device_t *dev, const char *name) 109 109 { 110 110 isa_fun_t *fun = calloc(1, sizeof(isa_fun_t)); … … 112 112 return NULL; 113 113 114 function_t *fnode = create_function();114 function_t *fnode = ddf_fun_create(dev, fun_inner, name); 115 115 if (fnode == NULL) { 116 116 free(fun); … … 417 417 return NULL; 418 418 419 isa_fun_t *fun = isa_fun_create( );419 isa_fun_t *fun = isa_fun_create(dev, fun_name); 420 420 if (fun == NULL) { 421 421 free(fun_name); 422 422 return NULL; 423 423 } 424 425 function_t *fnode = fun->fnode;426 fnode->name = fun_name;427 fnode->ftype = fun_inner;428 424 429 425 /* Allocate buffer for the list of hardware resources of the device. */ … … 447 443 448 444 /* Set device operations to the device. */ 449 fnode->ops = &isa_fun_ops; 450 451 printf(NAME ": register_function(fun, dev); function is %s.\n", 452 fnode->name); 453 register_function(fnode, dev); 445 fun->fnode->ops = &isa_fun_ops; 446 447 printf(NAME ": Binding function %s.\n", fun->fnode->name); 448 449 /* XXX Handle error */ 450 (void) ddf_fun_bind(fun->fnode); 454 451 455 452 return fun_conf; … … 482 479 printf(NAME ": adding a 'ctl' function\n"); 483 480 484 function_t *ctl = create_function(); 485 ctl->ftype = fun_exposed; 486 ctl->name = "ctl"; 487 register_function(ctl, dev); 481 function_t *ctl = ddf_fun_create(dev, fun_exposed, "ctl"); 482 if (ctl == NULL) { 483 printf(NAME ": Error creating control function.\n"); 484 return EXDEV; 485 } 486 487 if (ddf_fun_bind(ctl) != EOK) { 488 printf(NAME ": Error binding control function.\n"); 489 return EXDEV; 490 } 488 491 489 492 /* Add functions as specified in the configuration file. */
Note:
See TracChangeset
for help on using the changeset viewer.