hwmon: lm63: Use ARRAY_SIZE at appropriate place
authorAxel Lin <axel.lin@ingics.com>
Sat, 22 Jun 2013 16:55:14 +0000 (00:55 +0800)
committerTom Rini <trini@ti.com>
Wed, 26 Jun 2013 14:26:06 +0000 (10:26 -0400)
Signed-off-by: Axel Lin <axel.lin@ingics.com>
drivers/hwmon/lm63.c

index f3adf6485997e5fde82a8c14ad0806527a0118b3..bb8e644cd948ff0f4fb0b6e929f80f0b9020b954 100644 (file)
@@ -133,8 +133,7 @@ int dtt_init_one(int sensor)
        /*
         * Setup PWM Lookup-Table
         */
-       for (i = 0; i < sizeof(pwm_lookup) / sizeof(struct pwm_lookup_entry);
-            i++) {
+       for (i = 0; i < ARRAY_SIZE(pwm_lookup); i++) {
                int address = DTT_PWM_LOOKUP_BASE + 2 * i;
                val = pwm_lookup[i].temp;
                if (is_lm64(sensor))