diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2010-03-30 16:54:38 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2010-03-30 16:54:38 +1100 |
commit | 366d163311928dc5b3d5b5700ce34a96f247009e (patch) | |
tree | 151b9d0348c05966d1d425d43fd5ac58cbf40d4c /lib | |
parent | d9c0ea42b763b321479c00f7ba1ca141905955bc (diff) | |
parent | 832d72674364863496fee86a1dfd7c38b0a5c333 (diff) |
Merge branch 'quilt/driver-core'
Diffstat (limited to 'lib')
-rw-r--r-- | lib/kref.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/lib/kref.c b/lib/kref.c index 9ecd6e865610..69761d3de203 100644 --- a/lib/kref.c +++ b/lib/kref.c @@ -15,23 +15,13 @@ #include <linux/module.h> /** - * kref_set - initialize object and set refcount to requested number. - * @kref: object in question. - * @num: initial reference counter - */ -void kref_set(struct kref *kref, int num) -{ - atomic_set(&kref->refcount, num); - smp_mb(); -} - -/** * kref_init - initialize object. * @kref: object in question. */ void kref_init(struct kref *kref) { - kref_set(kref, 1); + atomic_set(&kref->refcount, 1); + smp_mb(); } /** @@ -71,7 +61,6 @@ int kref_put(struct kref *kref, void (*release)(struct kref *kref)) return 0; } -EXPORT_SYMBOL(kref_set); EXPORT_SYMBOL(kref_init); EXPORT_SYMBOL(kref_get); EXPORT_SYMBOL(kref_put); |