Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Evgeniy Polyakov and committed by
Greg Kroah-Hartman
2c5bfdac 339f0723

+15 -13
+4 -2
drivers/w1/w1.c
··· 214 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 218 .name = "w1_slave_driver", 219 219 .bus = &w1_bus_type, 220 220 }; 221 221 222 + #if 0 222 223 struct device w1_slave_device = { 223 224 .parent = NULL, 224 225 .bus = &w1_bus_type, ··· 227 226 .driver = &w1_slave_driver, 228 227 .release = &w1_slave_release 229 228 }; 229 + #endif /* 0 */ 230 230 231 231 static ssize_t w1_master_attribute_show_name(struct device *dev, struct device_attribute *attr, char *buf) 232 232 { ··· 385 383 return sysfs_create_group(&master->dev.kobj, &w1_master_defattr_group); 386 384 } 387 385 388 - void w1_destroy_master_attributes(struct w1_master *master) 386 + static void w1_destroy_master_attributes(struct w1_master *master) 389 387 { 390 388 sysfs_remove_group(&master->dev.kobj, &w1_master_defattr_group); 391 389 }
+10
drivers/w1/w1.h
··· 213 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 226 #endif /* __KERNEL__ */ 217 227 218 228 #endif /* __W1_H */
+1 -11
drivers/w1/w1_int.c
··· 30 30 31 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 33 static struct w1_master * w1_alloc_dev(u32 id, int slave_count, int slave_ttl, 44 34 struct device_driver *driver, 45 35 struct device *device) ··· 86 96 return dev; 87 97 } 88 98 89 - void w1_free_dev(struct w1_master *dev) 99 + static void w1_free_dev(struct w1_master *dev) 90 100 { 91 101 device_unregister(&dev->dev); 92 102 }