diff options
author | Per Persson <per.xb.persson@stericsson.com> | 2011-09-29 10:10:07 +0200 |
---|---|---|
committer | Jonas ABERG <jonas.aberg@stericsson.com> | 2011-09-30 13:45:08 +0200 |
commit | 6af190787080b9218254a76e70793c04cf1d312a (patch) | |
tree | 91df2da648ef9c8a6783f34d451008523f060446 | |
parent | 71c7c1a28ed2c99ff0437bba374ca8cf4dc2c4cc (diff) |
video: av8100: Fix wrong loop max value
The calculation of a max counter is corrected.
ST-Ericsson ID: 364552
ST-Ericsson Linux next: Not tested
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I4505ede69b1f1b36e27307db02f9ab2778c97341
Signed-off-by: Per Persson <per.xb.persson@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/32463
Reviewed-by: Jimmy RUBIN <jimmy.rubin@stericsson.com>
-rw-r--r-- | drivers/video/av8100/av8100.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/video/av8100/av8100.c b/drivers/video/av8100/av8100.c index 4b3fee2ff3c..0b4de42be4a 100644 --- a/drivers/video/av8100/av8100.c +++ b/drivers/video/av8100/av8100.c @@ -2497,7 +2497,7 @@ int av8100_download_firmware(enum interface_type if_type) /* Wait Internal Micro controler ready */ cnt = 0; - cnt_max = sizeof(waittime_retry); + cnt_max = sizeof(waittime_retry) / sizeof(waittime_retry[0]); retval = av8100_reg_gen_status_r(NULL, NULL, NULL, &uc, NULL, NULL); while ((retval == 0) && (uc != 0x1) && (cnt < cnt_max)) { @@ -3756,7 +3756,7 @@ int av8100_conf_w(enum av8100_command_type command_type, /* Get the first return byte */ mdelay(AV8100_WAITTIME_1MS); cnt = 0; - cnt_max = sizeof(waittime_retry); + cnt_max = sizeof(waittime_retry) / sizeof(waittime_retry[0]); retval = get_command_return_first(i2c, command_type); while (retval && (cnt < cnt_max)) { mdelay(waittime_retry[cnt]); @@ -3832,7 +3832,7 @@ int av8100_conf_w_raw(enum av8100_command_type command_type, /* Get the first return byte */ mdelay(AV8100_WAITTIME_1MS); cnt = 0; - cnt_max = sizeof(waittime_retry); + cnt_max = sizeof(waittime_retry) / sizeof(waittime_retry[0]); retval = get_command_return_first(i2c, command_type); while (retval && (cnt < cnt_max)) { mdelay(waittime_retry[cnt]); |