From: Axel Lin Date: Sat, 22 Jun 2013 16:55:14 +0000 (+0800) Subject: hwmon: lm63: Use ARRAY_SIZE at appropriate place X-Git-Tag: v2013.07-rc2~12 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b98bfeb6674bd33effe9e093f071e7eeb3174f2e;p=u-boot hwmon: lm63: Use ARRAY_SIZE at appropriate place Signed-off-by: Axel Lin --- diff --git a/drivers/hwmon/lm63.c b/drivers/hwmon/lm63.c index f3adf64859..bb8e644cd9 100644 --- a/drivers/hwmon/lm63.c +++ b/drivers/hwmon/lm63.c @@ -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))