diff options
-rw-r--r-- | drivers/w1/slaves/w1_therm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/w1/slaves/w1_therm.c b/drivers/w1/slaves/w1_therm.c index b022fffd8c51..732db4780042 100644 --- a/drivers/w1/slaves/w1_therm.c +++ b/drivers/w1/slaves/w1_therm.c | |||
@@ -141,7 +141,7 @@ static inline int w1_convert_temp(u8 rom[9], u8 fid) | |||
141 | { | 141 | { |
142 | int i; | 142 | int i; |
143 | 143 | ||
144 | for (i=0; i<sizeof(w1_therm_families)/sizeof(w1_therm_families[0]); ++i) | 144 | for (i = 0; i < ARRAY_SIZE(w1_therm_families); ++i) |
145 | if (w1_therm_families[i].f->fid == fid) | 145 | if (w1_therm_families[i].f->fid == fid) |
146 | return w1_therm_families[i].convert(rom); | 146 | return w1_therm_families[i].convert(rom); |
147 | 147 | ||
@@ -238,7 +238,7 @@ static int __init w1_therm_init(void) | |||
238 | { | 238 | { |
239 | int err, i; | 239 | int err, i; |
240 | 240 | ||
241 | for (i=0; i<sizeof(w1_therm_families)/sizeof(w1_therm_families[0]); ++i) { | 241 | for (i = 0; i < ARRAY_SIZE(w1_therm_families); ++i) { |
242 | err = w1_register_family(w1_therm_families[i].f); | 242 | err = w1_register_family(w1_therm_families[i].f); |
243 | if (err) | 243 | if (err) |
244 | w1_therm_families[i].broken = 1; | 244 | w1_therm_families[i].broken = 1; |
@@ -251,7 +251,7 @@ static void __exit w1_therm_fini(void) | |||
251 | { | 251 | { |
252 | int i; | 252 | int i; |
253 | 253 | ||
254 | for (i=0; i<sizeof(w1_therm_families)/sizeof(w1_therm_families[0]); ++i) | 254 | for (i = 0; i < ARRAY_SIZE(w1_therm_families); ++i) |
255 | if (!w1_therm_families[i].broken) | 255 | if (!w1_therm_families[i].broken) |
256 | w1_unregister_family(w1_therm_families[i].f); | 256 | w1_unregister_family(w1_therm_families[i].f); |
257 | } | 257 | } |