aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/w1/w1.c6
-rw-r--r--drivers/w1/w1.h10
-rw-r--r--drivers/w1/w1_family.c2
-rw-r--r--drivers/w1/w1_int.c13
-rw-r--r--drivers/w1/w1_io.c2
5 files changed, 18 insertions, 15 deletions
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
index f0b47fe4ed25..5def7fb903ac 100644
--- a/drivers/w1/w1.c
+++ b/drivers/w1/w1.c
@@ -164,11 +164,12 @@ struct device w1_master_device = {
164 .release = &w1_master_release 164 .release = &w1_master_release
165}; 165};
166 166
167struct device_driver w1_slave_driver = { 167static struct device_driver w1_slave_driver = {
168 .name = "w1_slave_driver", 168 .name = "w1_slave_driver",
169 .bus = &w1_bus_type, 169 .bus = &w1_bus_type,
170}; 170};
171 171
172#if 0
172struct device w1_slave_device = { 173struct device w1_slave_device = {
173 .parent = NULL, 174 .parent = NULL,
174 .bus = &w1_bus_type, 175 .bus = &w1_bus_type,
@@ -176,6 +177,7 @@ struct device w1_slave_device = {
176 .driver = &w1_slave_driver, 177 .driver = &w1_slave_driver,
177 .release = &w1_slave_release 178 .release = &w1_slave_release
178}; 179};
180#endif /* 0 */
179 181
180static ssize_t w1_master_attribute_show_name(struct device *dev, struct device_attribute *attr, char *buf) 182static ssize_t w1_master_attribute_show_name(struct device *dev, struct device_attribute *attr, char *buf)
181{ 183{
@@ -355,7 +357,7 @@ int w1_create_master_attributes(struct w1_master *master)
355 return sysfs_create_group(&master->dev.kobj, &w1_master_defattr_group); 357 return sysfs_create_group(&master->dev.kobj, &w1_master_defattr_group);
356} 358}
357 359
358void w1_destroy_master_attributes(struct w1_master *master) 360static void w1_destroy_master_attributes(struct w1_master *master)
359{ 361{
360 sysfs_remove_group(&master->dev.kobj, &w1_master_defattr_group); 362 sysfs_remove_group(&master->dev.kobj, &w1_master_defattr_group);
361} 363}
diff --git a/drivers/w1/w1.h b/drivers/w1/w1.h
index b62e771e5709..5f09213512bf 100644
--- a/drivers/w1/w1.h
+++ b/drivers/w1/w1.h
@@ -203,6 +203,16 @@ static inline struct w1_master* dev_to_w1_master(struct device *dev)
203 return container_of(dev, struct w1_master, dev); 203 return container_of(dev, struct w1_master, dev);
204} 204}
205 205
206extern int w1_max_slave_count;
207extern int w1_max_slave_ttl;
208extern spinlock_t w1_mlock;
209extern struct list_head w1_masters;
210extern struct device_driver w1_master_driver;
211extern struct device w1_master_device;
212
213int w1_process(void *data);
214void w1_reconnect_slaves(struct w1_family *f);
215
206#endif /* __KERNEL__ */ 216#endif /* __KERNEL__ */
207 217
208#endif /* __W1_H */ 218#endif /* __W1_H */
diff --git a/drivers/w1/w1_family.c b/drivers/w1/w1_family.c
index 9e293e139a0e..0e32c114f906 100644
--- a/drivers/w1/w1_family.c
+++ b/drivers/w1/w1_family.c
@@ -25,10 +25,10 @@
25#include <linux/delay.h> 25#include <linux/delay.h>
26 26
27#include "w1_family.h" 27#include "w1_family.h"
28#include "w1.h"
28 29
29DEFINE_SPINLOCK(w1_flock); 30DEFINE_SPINLOCK(w1_flock);
30static LIST_HEAD(w1_families); 31static LIST_HEAD(w1_families);
31extern void w1_reconnect_slaves(struct w1_family *f);
32 32
33int w1_register_family(struct w1_family *newf) 33int w1_register_family(struct w1_family *newf)
34{ 34{
diff --git a/drivers/w1/w1_int.c b/drivers/w1/w1_int.c
index c3f67eafc7ec..4724693ad51d 100644
--- a/drivers/w1/w1_int.c
+++ b/drivers/w1/w1_int.c
@@ -26,19 +26,10 @@
26#include "w1.h" 26#include "w1.h"
27#include "w1_log.h" 27#include "w1_log.h"
28#include "w1_netlink.h" 28#include "w1_netlink.h"
29#include "w1_int.h"
29 30
30static u32 w1_ids = 1; 31static u32 w1_ids = 1;
31 32
32extern struct device_driver w1_master_driver;
33extern struct bus_type w1_bus_type;
34extern struct device w1_master_device;
35extern int w1_max_slave_count;
36extern int w1_max_slave_ttl;
37extern struct list_head w1_masters;
38extern spinlock_t w1_mlock;
39
40extern int w1_process(void *);
41
42static struct w1_master * w1_alloc_dev(u32 id, int slave_count, int slave_ttl, 33static struct w1_master * w1_alloc_dev(u32 id, int slave_count, int slave_ttl,
43 struct device_driver *driver, 34 struct device_driver *driver,
44 struct device *device) 35 struct device *device)
@@ -103,7 +94,7 @@ static struct w1_master * w1_alloc_dev(u32 id, int slave_count, int slave_ttl,
103 return dev; 94 return dev;
104} 95}
105 96
106void w1_free_dev(struct w1_master *dev) 97static void w1_free_dev(struct w1_master *dev)
107{ 98{
108 device_unregister(&dev->dev); 99 device_unregister(&dev->dev);
109} 100}
diff --git a/drivers/w1/w1_io.c b/drivers/w1/w1_io.c
index e2a043354ddf..f7f7e8bec30e 100644
--- a/drivers/w1/w1_io.c
+++ b/drivers/w1/w1_io.c
@@ -28,7 +28,7 @@
28#include "w1_log.h" 28#include "w1_log.h"
29#include "w1_io.h" 29#include "w1_io.h"
30 30
31int w1_delay_parm = 1; 31static int w1_delay_parm = 1;
32module_param_named(delay_coef, w1_delay_parm, int, 0); 32module_param_named(delay_coef, w1_delay_parm, int, 0);
33 33
34static u8 w1_crc8_table[] = { 34static u8 w1_crc8_table[] = {