Changeset bfe7867 in mainline
- Timestamp:
- 2011-08-29T19:03:17Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c5be39b
- Parents:
- 4d94002d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/driver.c
r4d94002d rbfe7867 673 673 } 674 674 675 /** Increase function reference count. */ 675 /** Increase function reference count. 676 * 677 * This also increases reference count on the device. The device structure 678 * will thus not be deallocated while there are some associated function 679 * structures. 680 */ 676 681 static void fun_add_ref(ddf_fun_t *fun) 677 682 { 683 dev_add_ref(fun->dev); 678 684 atomic_inc(&fun->refcnt); 679 685 } … … 685 691 static void fun_del_ref(ddf_fun_t *fun) 686 692 { 693 ddf_dev_t *dev = fun->dev; 694 687 695 if (atomic_predec(&fun->refcnt) == 0) 688 696 delete_function(fun); 697 698 dev_del_ref(dev); 689 699 } 690 700 … … 721 731 722 732 /* Add one reference that will be dropped by ddf_fun_destroy() */ 733 fun->dev = dev; 723 734 fun_add_ref(fun); 724 735 725 736 fun->bound = false; 726 fun->dev = dev;727 737 fun->ftype = ftype; 728 738
Note:
See TracChangeset
for help on using the changeset viewer.