diff options
author | Evgeniy Polyakov <johnpol@2ka.mipt.ru> | 2005-05-02 06:26:42 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-06-22 00:43:09 -0400 |
commit | 85e941cc9f10316080a16b121d24d329e5c2a65d (patch) | |
tree | 85e034582cfb6f9efb40e49efdef3490f5e56eb6 /drivers/w1/w1_smem.c | |
parent | 718a538f945a84244a460df434c3f6f04701957b (diff) |
[PATCH] w1_smem: support for new simple rom family [0x81 id].
Support for new simple rom family [0x81 id].
It is the same as existing 0x01 family,
which is used in ds9490* w1 adapters.
Patch is on top of new-thermal-sensor-families patch.
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/w1/w1_smem.c')
-rw-r--r-- | drivers/w1/w1_smem.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/drivers/w1/w1_smem.c b/drivers/w1/w1_smem.c index 674eb75a9bad..4a335f1a2ae2 100644 --- a/drivers/w1/w1_smem.c +++ b/drivers/w1/w1_smem.c | |||
@@ -99,19 +99,37 @@ out_dec: | |||
99 | return count; | 99 | return count; |
100 | } | 100 | } |
101 | 101 | ||
102 | static struct w1_family w1_smem_family = { | 102 | static struct w1_family w1_smem_family_01 = { |
103 | .fid = W1_FAMILY_SMEM, | 103 | .fid = W1_FAMILY_SMEM_01, |
104 | .fops = &w1_smem_fops, | ||
105 | }; | ||
106 | |||
107 | static struct w1_family w1_smem_family_81 = { | ||
108 | .fid = W1_FAMILY_SMEM_81, | ||
104 | .fops = &w1_smem_fops, | 109 | .fops = &w1_smem_fops, |
105 | }; | 110 | }; |
106 | 111 | ||
107 | static int __init w1_smem_init(void) | 112 | static int __init w1_smem_init(void) |
108 | { | 113 | { |
109 | return w1_register_family(&w1_smem_family); | 114 | int err; |
115 | |||
116 | err = w1_register_family(&w1_smem_family_01); | ||
117 | if (err) | ||
118 | return err; | ||
119 | |||
120 | err = w1_register_family(&w1_smem_family_81); | ||
121 | if (err) { | ||
122 | w1_unregister_family(&w1_smem_family_01); | ||
123 | return err; | ||
124 | } | ||
125 | |||
126 | return 0; | ||
110 | } | 127 | } |
111 | 128 | ||
112 | static void __exit w1_smem_fini(void) | 129 | static void __exit w1_smem_fini(void) |
113 | { | 130 | { |
114 | w1_unregister_family(&w1_smem_family); | 131 | w1_unregister_family(&w1_smem_family_01); |
132 | w1_unregister_family(&w1_smem_family_81); | ||
115 | } | 133 | } |
116 | 134 | ||
117 | module_init(w1_smem_init); | 135 | module_init(w1_smem_init); |