diff options
author | Evgeniy Polyakov <johnpol@2ka.mipt.ru> | 2006-04-04 12:35:22 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-06-22 14:22:50 -0400 |
commit | 2c5bfdac33607a618d8cf1532ef235ca9eccd49e (patch) | |
tree | 77786a135938d368db3d386ab864fc9d8d50c153 | |
parent | 339f07236b481371ffb4993cf309dd1f1b3382ab (diff) |
[PATCH] W1: cleanups
Nice cleanup spotted by Adrian Bunk, which was lost due to moving to the
completely new functionality.
Shame-shame-shame on me.
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/w1/w1.c | 6 | ||||
-rw-r--r-- | drivers/w1/w1.h | 10 | ||||
-rw-r--r-- | drivers/w1/w1_int.c | 12 |
3 files changed, 15 insertions, 13 deletions
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c index 420be14c2f8e..b41366a0784c 100644 --- a/drivers/w1/w1.c +++ b/drivers/w1/w1.c | |||
@@ -214,11 +214,12 @@ struct device w1_master_device = { | |||
214 | .release = &w1_master_release | 214 | .release = &w1_master_release |
215 | }; | 215 | }; |
216 | 216 | ||
217 | struct device_driver w1_slave_driver = { | 217 | static struct device_driver w1_slave_driver = { |
218 | .name = "w1_slave_driver", | 218 | .name = "w1_slave_driver", |
219 | .bus = &w1_bus_type, | 219 | .bus = &w1_bus_type, |
220 | }; | 220 | }; |
221 | 221 | ||
222 | #if 0 | ||
222 | struct device w1_slave_device = { | 223 | struct device w1_slave_device = { |
223 | .parent = NULL, | 224 | .parent = NULL, |
224 | .bus = &w1_bus_type, | 225 | .bus = &w1_bus_type, |
@@ -226,6 +227,7 @@ struct device w1_slave_device = { | |||
226 | .driver = &w1_slave_driver, | 227 | .driver = &w1_slave_driver, |
227 | .release = &w1_slave_release | 228 | .release = &w1_slave_release |
228 | }; | 229 | }; |
230 | #endif /* 0 */ | ||
229 | 231 | ||
230 | static ssize_t w1_master_attribute_show_name(struct device *dev, struct device_attribute *attr, char *buf) | 232 | static ssize_t w1_master_attribute_show_name(struct device *dev, struct device_attribute *attr, char *buf) |
231 | { | 233 | { |
@@ -383,7 +385,7 @@ int w1_create_master_attributes(struct w1_master *master) | |||
383 | return sysfs_create_group(&master->dev.kobj, &w1_master_defattr_group); | 385 | return sysfs_create_group(&master->dev.kobj, &w1_master_defattr_group); |
384 | } | 386 | } |
385 | 387 | ||
386 | void w1_destroy_master_attributes(struct w1_master *master) | 388 | static void w1_destroy_master_attributes(struct w1_master *master) |
387 | { | 389 | { |
388 | sysfs_remove_group(&master->dev.kobj, &w1_master_defattr_group); | 390 | sysfs_remove_group(&master->dev.kobj, &w1_master_defattr_group); |
389 | } | 391 | } |
diff --git a/drivers/w1/w1.h b/drivers/w1/w1.h index 6caccfc97cdf..3828f39b22eb 100644 --- a/drivers/w1/w1.h +++ b/drivers/w1/w1.h | |||
@@ -213,6 +213,16 @@ static inline struct w1_master* dev_to_w1_master(struct device *dev) | |||
213 | return container_of(dev, struct w1_master, dev); | 213 | return container_of(dev, struct w1_master, dev); |
214 | } | 214 | } |
215 | 215 | ||
216 | extern struct device_driver w1_master_driver; | ||
217 | extern struct bus_type w1_bus_type; | ||
218 | extern struct device w1_master_device; | ||
219 | extern int w1_max_slave_count; | ||
220 | extern int w1_max_slave_ttl; | ||
221 | extern struct list_head w1_masters; | ||
222 | extern struct mutex w1_mlock; | ||
223 | |||
224 | extern int w1_process(void *); | ||
225 | |||
216 | #endif /* __KERNEL__ */ | 226 | #endif /* __KERNEL__ */ |
217 | 227 | ||
218 | #endif /* __W1_H */ | 228 | #endif /* __W1_H */ |
diff --git a/drivers/w1/w1_int.c b/drivers/w1/w1_int.c index 24e7c102fa75..475996cd1b7d 100644 --- a/drivers/w1/w1_int.c +++ b/drivers/w1/w1_int.c | |||
@@ -30,16 +30,6 @@ | |||
30 | 30 | ||
31 | static u32 w1_ids = 1; | 31 | static u32 w1_ids = 1; |
32 | 32 | ||
33 | extern struct device_driver w1_master_driver; | ||
34 | extern struct bus_type w1_bus_type; | ||
35 | extern struct device w1_master_device; | ||
36 | extern int w1_max_slave_count; | ||
37 | extern int w1_max_slave_ttl; | ||
38 | extern struct list_head w1_masters; | ||
39 | extern struct mutex w1_mlock; | ||
40 | |||
41 | extern int w1_process(void *); | ||
42 | |||
43 | static struct w1_master * w1_alloc_dev(u32 id, int slave_count, int slave_ttl, | 33 | static struct w1_master * w1_alloc_dev(u32 id, int slave_count, int slave_ttl, |
44 | struct device_driver *driver, | 34 | struct device_driver *driver, |
45 | struct device *device) | 35 | struct device *device) |
@@ -96,7 +86,7 @@ static struct w1_master * w1_alloc_dev(u32 id, int slave_count, int slave_ttl, | |||
96 | return dev; | 86 | return dev; |
97 | } | 87 | } |
98 | 88 | ||
99 | void w1_free_dev(struct w1_master *dev) | 89 | static void w1_free_dev(struct w1_master *dev) |
100 | { | 90 | { |
101 | device_unregister(&dev->dev); | 91 | device_unregister(&dev->dev); |
102 | } | 92 | } |