aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/w1/w1_family.c
diff options
context:
space:
mode:
authorEvgeniy Polyakov <johnpol@2ka.mipt.ru>2006-04-24 02:46:14 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-22 14:22:50 -0400
commit70d484bff43013e9b08f5d970b1c5941e9d98e16 (patch)
tree1d5fdc87b7cdfe45b4ae745aef0310c256bd50f7 /drivers/w1/w1_family.c
parent2c5bfdac33607a618d8cf1532ef235ca9eccd49e (diff)
[PATCH] W1: possible cleanups
This patch contains the following possible cleanups: - the following file did't #include the header with the prototypes for it's global functions: - w1_int.c - #if 0 the following unused global function: - w1_family.c: w1_family_get() - make the following needlessly global functions static: - w1_family.c: __w1_family_put() - w1_io.c: w1_delay() - w1_io.c: w1_touch_bit() - w1_io.c: w1_read_8() - remove the following unused EXPORT_SYMBOL's: - w1_family.c: w1_family_put - w1_family.c: w1_family_registered Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/w1/w1_family.c')
-rw-r--r--drivers/w1/w1_family.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/w1/w1_family.c b/drivers/w1/w1_family.c
index 0e32c114f906..a3c95bd6890a 100644
--- a/drivers/w1/w1_family.c
+++ b/drivers/w1/w1_family.c
@@ -107,6 +107,12 @@ struct w1_family * w1_family_registered(u8 fid)
107 return (ret) ? f : NULL; 107 return (ret) ? f : NULL;
108} 108}
109 109
110static void __w1_family_put(struct w1_family *f)
111{
112 if (atomic_dec_and_test(&f->refcnt))
113 f->need_exit = 1;
114}
115
110void w1_family_put(struct w1_family *f) 116void w1_family_put(struct w1_family *f)
111{ 117{
112 spin_lock(&w1_flock); 118 spin_lock(&w1_flock);
@@ -114,19 +120,14 @@ void w1_family_put(struct w1_family *f)
114 spin_unlock(&w1_flock); 120 spin_unlock(&w1_flock);
115} 121}
116 122
117void __w1_family_put(struct w1_family *f) 123#if 0
118{
119 if (atomic_dec_and_test(&f->refcnt))
120 f->need_exit = 1;
121}
122
123void w1_family_get(struct w1_family *f) 124void w1_family_get(struct w1_family *f)
124{ 125{
125 spin_lock(&w1_flock); 126 spin_lock(&w1_flock);
126 __w1_family_get(f); 127 __w1_family_get(f);
127 spin_unlock(&w1_flock); 128 spin_unlock(&w1_flock);
128
129} 129}
130#endif /* 0 */
130 131
131void __w1_family_get(struct w1_family *f) 132void __w1_family_get(struct w1_family *f)
132{ 133{
@@ -135,8 +136,5 @@ void __w1_family_get(struct w1_family *f)
135 smp_mb__after_atomic_inc(); 136 smp_mb__after_atomic_inc();
136} 137}
137 138
138EXPORT_SYMBOL(w1_family_get);
139EXPORT_SYMBOL(w1_family_put);
140EXPORT_SYMBOL(w1_family_registered);
141EXPORT_SYMBOL(w1_unregister_family); 139EXPORT_SYMBOL(w1_unregister_family);
142EXPORT_SYMBOL(w1_register_family); 140EXPORT_SYMBOL(w1_register_family);