summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/devfreq/exynos5422_bus_int.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/devfreq/exynos5422_bus_int.c b/drivers/devfreq/exynos5422_bus_int.c
index c6e6d79be19..bdc873b9d15 100644
--- a/drivers/devfreq/exynos5422_bus_int.c
+++ b/drivers/devfreq/exynos5422_bus_int.c
@@ -781,7 +781,7 @@ static void exynos5_int_set_freq(struct busfreq_data_int *data,
printk("Set int target: %ld\n", target_freq);
#endif
/* Find setting value with target and previous frequency */
- for (i = 0; i < LV_END; i++) {
+ for (i = 0; i < ARRAY_SIZE(int_bus_opp_list); i++) {
if (int_bus_opp_list[i].freq == target_freq)
target_idx = int_bus_opp_list[i].idx;
if (int_bus_opp_list[i].freq == pre_freq)
@@ -924,7 +924,7 @@ static void exynos5_int_update_state(unsigned int target_freq)
/*
* Find setting value with target frequency
*/
- for (i = LV_0; i < LV_END; i++) {
+ for (i = 0; i < ARRAY_SIZE(int_bus_opp_list); i++) {
if (int_bus_opp_list[i].freq == target_freq)
target_idx = i;
}
@@ -981,7 +981,7 @@ static int exynos5_int_busfreq_target(struct device *dev,
target_volt = get_limit_voltage(target_volt, data->volt_offset);
#endif
- for (i = LV_0; i < LV_END; i++) {
+ for (i = 0; i < ARRAY_SIZE(int_bus_opp_list); i++) {
if (int_bus_opp_list[i].freq == freq)
target_idx = int_bus_opp_list[i].idx;
}
@@ -1125,7 +1125,7 @@ static ssize_t int_show_state(struct device *dev, struct device_attribute *attr,
{
unsigned int i;
ssize_t len = 0;
- ssize_t write_cnt = (ssize_t)((PAGE_SIZE / LV_END) - 2);
+ ssize_t __maybe_unused write_cnt = (ssize_t)((PAGE_SIZE / LV_END) - 2);
int count = opp_get_opp_count(dev->parent);
for (i = LV_0; i < count; i++)
@@ -1394,7 +1394,7 @@ static int exynos5_devfreq_int_probe(struct platform_device *pdev)
volt = opp_get_voltage(opp);
rcu_read_unlock();
regulator_set_voltage(data->vdd_int, volt, volt + VOLT_STEP);
- for (i = LV_0; i < LV_END; i++) {
+ for (i = 0; i < ARRAY_SIZE(int_bus_opp_list); i++) {
if (int_bus_opp_list[i].freq == exynos5_int_devfreq_profile.initial_freq)
index = int_bus_opp_list[i].idx;
}