Changeset cd0684d in mainline for uspace/lib/drv
- Timestamp:
- 2011-02-14T22:14:52Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 659ca07
- Parents:
- 97a62fe
- Location:
- uspace/lib/drv
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/driver.c
r97a62fe rcd0684d 607 607 } 608 608 609 /** Add single match ID to function. 610 * 611 * Construct and add a single match ID to the specified function. 612 * 613 * @param fun Function 614 * @param match_id_str Match string 615 * @param match_score Match score 616 * @return EOK on success, ENOMEM if out of memory. 617 */ 618 int ddf_fun_add_match_id(function_t *fun, const char *match_id_str, 619 int match_score) 620 { 621 match_id_t *match_id; 622 623 match_id = create_match_id(); 624 if (match_id == NULL) 625 return ENOMEM; 626 627 match_id->id = match_id_str; 628 match_id->score = 90; 629 630 add_match_id(&fun->match_ids, match_id); 631 return EOK; 632 } 633 634 609 635 /** Wrapper for child_device_register for devices with single match id. 610 636 * -
uspace/lib/drv/include/driver.h
r97a62fe rcd0684d 162 162 extern void ddf_fun_destroy(function_t *); 163 163 extern int ddf_fun_bind(function_t *); 164 extern int ddf_fun_add_match_id(function_t *, const char *, int); 164 165 165 166 extern void *function_get_ops(function_t *, dev_inferface_idx_t);
Note:
See TracChangeset
for help on using the changeset viewer.