diff options
author | Evgeniy Polyakov <johnpol@2ka.mipt.ru> | 2005-08-11 09:27:50 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-09-08 17:41:26 -0400 |
commit | d2a4ef6a0ce4d841293b49bf2cdc17a0ebfaaf9d (patch) | |
tree | 2d49373e06fd65aae5217aad864fafb849c8cda2 /drivers/w1/w1_family.c | |
parent | ea7d8f65c865ebfa1d7cd67c360a87333ff013c1 (diff) |
[PATCH] w1: Added add/remove slave callbacks.
Patch is based on work from Ben Gardner <bgardner@wabtec.com>
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.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/drivers/w1/w1_family.c b/drivers/w1/w1_family.c index 02eee57d3c0c..88c517a4c178 100644 --- a/drivers/w1/w1_family.c +++ b/drivers/w1/w1_family.c | |||
@@ -29,23 +29,12 @@ DEFINE_SPINLOCK(w1_flock); | |||
29 | static LIST_HEAD(w1_families); | 29 | static LIST_HEAD(w1_families); |
30 | extern void w1_reconnect_slaves(struct w1_family *f); | 30 | extern void w1_reconnect_slaves(struct w1_family *f); |
31 | 31 | ||
32 | static int w1_check_family(struct w1_family *f) | ||
33 | { | ||
34 | if (!f->fops->rname || !f->fops->rbin) | ||
35 | return -EINVAL; | ||
36 | |||
37 | return 0; | ||
38 | } | ||
39 | |||
40 | int w1_register_family(struct w1_family *newf) | 32 | int w1_register_family(struct w1_family *newf) |
41 | { | 33 | { |
42 | struct list_head *ent, *n; | 34 | struct list_head *ent, *n; |
43 | struct w1_family *f; | 35 | struct w1_family *f; |
44 | int ret = 0; | 36 | int ret = 0; |
45 | 37 | ||
46 | if (w1_check_family(newf)) | ||
47 | return -EINVAL; | ||
48 | |||
49 | spin_lock(&w1_flock); | 38 | spin_lock(&w1_flock); |
50 | list_for_each_safe(ent, n, &w1_families) { | 39 | list_for_each_safe(ent, n, &w1_families) { |
51 | f = list_entry(ent, struct w1_family, family_entry); | 40 | f = list_entry(ent, struct w1_family, family_entry); |