Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
[sfrench/cifs-2.6.git] / drivers / w1 / slaves / w1_therm.c
index b022fffd8c5181fe10a65f55438159df2ed61ea1..732db4780042b6da2ecde6d7b7b2687c342cfc55 100644 (file)
@@ -141,7 +141,7 @@ static inline int w1_convert_temp(u8 rom[9], u8 fid)
 {
        int i;
 
-       for (i=0; i<sizeof(w1_therm_families)/sizeof(w1_therm_families[0]); ++i)
+       for (i = 0; i < ARRAY_SIZE(w1_therm_families); ++i)
                if (w1_therm_families[i].f->fid == fid)
                        return w1_therm_families[i].convert(rom);
 
@@ -238,7 +238,7 @@ static int __init w1_therm_init(void)
 {
        int err, i;
 
-       for (i=0; i<sizeof(w1_therm_families)/sizeof(w1_therm_families[0]); ++i) {
+       for (i = 0; i < ARRAY_SIZE(w1_therm_families); ++i) {
                err = w1_register_family(w1_therm_families[i].f);
                if (err)
                        w1_therm_families[i].broken = 1;
@@ -251,7 +251,7 @@ static void __exit w1_therm_fini(void)
 {
        int i;
 
-       for (i=0; i<sizeof(w1_therm_families)/sizeof(w1_therm_families[0]); ++i)
+       for (i = 0; i < ARRAY_SIZE(w1_therm_families); ++i)
                if (!w1_therm_families[i].broken)
                        w1_unregister_family(w1_therm_families[i].f);
 }