Skip to contentSkip to conversation

Exynos4: Remove meaningless REGULATOR config option

PATCH New Kyungmin Park 4 participants 5 messages Mar 4, 2011 – Mar 7, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Exynos4: Remove meaningless REGULATOR config option

From: Kyungmin Park <[email protected]>

reguration APIs are guarded at its header file
No need to define at codes.

---

arch/arm/mach-exynos4/cpufreq.c +0 -10
index 174f080..a16ac35 100644
@@ -31,10 +31,8 @@ static struct clk *moutcore;
 static struct clk *mout_mpll;
 static struct clk *mout_apll;
 
-#ifdef CONFIG_REGULATOR
 static struct regulator *arm_regulator;
 static struct regulator *int_regulator;
-#endif
 
 static struct cpufreq_freqs freqs;
 static unsigned int memtype;
@@ -434,10 +432,8 @@ static int exynos4_target(struct cpufreq_policy *policy,
 	/* control regulator */
 	if (freqs.new > freqs.old) {
 		/* Voltage up */
-#ifdef CONFIG_REGULATOR
 		regulator_set_voltage(arm_regulator, arm_volt, arm_volt);
 		regulator_set_voltage(int_regulator, int_volt, int_volt);
-#endif
 	}
 
 	/* Clock Configuration Procedure */
@@ -446,10 +442,8 @@ static int exynos4_target(struct cpufreq_policy *policy,
 	/* control regulator */
 	if (freqs.new < freqs.old) {
 		/* Voltage down */
-#ifdef CONFIG_REGULATOR
 		regulator_set_voltage(arm_regulator, arm_volt, arm_volt);
 		regulator_set_voltage(int_regulator, int_volt, int_volt);
-#endif
 	}
 
 	cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
@@ -521,7 +515,6 @@ static int __init exynos4_cpufreq_init(void)
 	if (IS_ERR(mout_apll))
 		goto out;
 
-#ifdef CONFIG_REGULATOR
 	arm_regulator = regulator_get(NULL, "vdd_arm");
 	if (IS_ERR(arm_regulator)) {
 		printk(KERN_ERR "failed to get resource %s\n", "vdd_arm");
@@ -533,7 +526,6 @@ static int __init exynos4_cpufreq_init(void)
 		printk(KERN_ERR "failed to get resource %s\n", "vdd_int");
 		goto out;
 	}
-#endif
 
 	/*
 	 * Check DRAM type.
@@ -565,13 +557,11 @@ out:
 	if (!IS_ERR(mout_apll))
 		clk_put(mout_apll);
 
-#ifdef CONFIG_REGULATOR
 	if (!IS_ERR(arm_regulator))
 		regulator_put(arm_regulator);
 
 	if (!IS_ERR(int_regulator))
 		regulator_put(int_regulator);
-#endif
 
 	printk(KERN_ERR "%s: failed initialization\n", __func__);
 
#1 lore raw

PATCH 1/1 Exynos4: Remove meaningless REGULATOR config option

Hello.

Quoted 3 lines · Kyungmin Park

From: Kyungmin Park<[email protected]>

reguration APIs are guarded at its header file

Regulation?

Quoted 1 line

No need to define at codes.

Can't understand this.

Quoted 1 line

WBR, Sergei

#2 lore raw

PATCH 1/1 Exynos4: Remove meaningless REGULATOR config option

Quoted 11 lines · Sergei Shtylyov
Quoted 3 lines · Kyungmin Park

From: Kyungmin Park<[email protected]>

reguration APIs are guarded at its header file

Regulation?

Quoted 1 line

No need to define at codes.

Can't understand this.

The regulator API ifdefs itself out when not enabled so there is no need for users to do this.

#3 lore raw

PATCH 1/1 Exynos4: Remove meaningless REGULATOR config option

Quoted 8 lines · Mark Brown
Quoted 5 lines · Sergei Shtylyov
Quoted 3 lines · Kyungmin Park

From: Kyungmin Park<[email protected]>

reguration APIs are guarded at its header file

Quoted 8 lines
Quoted 5 lines

Regulation?

Quoted 1 line

No need to define at codes.

Can't understand this.

The regulator API ifdefs itself out when not enabled so there is no need for users to do this.

Hi Mark and Sergei,

Thanks for your pointing out and suggestion :)

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#4 lore raw

PATCH 1/1 Exynos4: Remove meaningless REGULATOR config option

In reply to Kyungmin Park

arch/arm/mach-exynos4/cpufreq.c static int exynos4_target(struct cpufreq_policy

Quoted 25 lines · Kyungmin Park

From: Kyungmin Park <[email protected]>

reguration APIs are guarded at its header file
No need to define at codes.

---

arch/arm/mach- renamed from arch/arm/mach-exynos4/cpufreq.c +0 -0

exynos4/cpufreq.c
index 174f080..a16ac35 100644

arch/arm/mach-exynos4/cpufreq.c +0 -2
@@ -31,10 +31,8 @@ static struct clk *moutcore;
 static struct clk *mout_mpll;
 static struct clk *mout_apll;
 
-#ifdef CONFIG_REGULATOR
 static struct regulator *arm_regulator;
 static struct regulator *int_regulator;
-#endif
 
 static struct cpufreq_freqs freqs;
 static unsigned int memtype;
@@ -434,10 +432,8 @@ static int exynos4_target(struct cpufreq_policy

*policy,

arch/arm/mach-exynos4/cpufreq.c static int exynos4_target(struct cpufreq_policy

Quoted 11 lines
arch/arm/mach-exynos4/cpufreq.c +0 -2
 	/* control regulator */
 	if (freqs.new > freqs.old) {
 		/* Voltage up */
-#ifdef CONFIG_REGULATOR
 		regulator_set_voltage(arm_regulator, arm_volt, arm_volt);
 		regulator_set_voltage(int_regulator, int_volt, int_volt);
-#endif
 	}
 
 	/* Clock Configuration Procedure */
@@ -446,10 +442,8 @@ static int exynos4_target(struct cpufreq_policy

*policy,

Quoted 30 lines
arch/arm/mach-exynos4/cpufreq.c +0 -4
 	/* control regulator */
 	if (freqs.new < freqs.old) {
 		/* Voltage down */
-#ifdef CONFIG_REGULATOR
 		regulator_set_voltage(arm_regulator, arm_volt, arm_volt);
 		regulator_set_voltage(int_regulator, int_volt, int_volt);
-#endif
 	}
 
 	cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
@@ -521,7 +515,6 @@ static int __init exynos4_cpufreq_init(void)
 	if (IS_ERR(mout_apll))
 		goto out;
 
-#ifdef CONFIG_REGULATOR
 	arm_regulator = regulator_get(NULL, "vdd_arm");
 	if (IS_ERR(arm_regulator)) {
 		printk(KERN_ERR "failed to get resource %s\n", "vdd_arm");
@@ -533,7 +526,6 @@ static int __init exynos4_cpufreq_init(void)
 		printk(KERN_ERR "failed to get resource %s\n", "vdd_int");
 		goto out;
 	}
-#endif
 
 	/*
 	 * Check DRAM type.
@@ -565,13 +557,11 @@ out:
 	if (!IS_ERR(mout_apll))
 		clk_put(mout_apll);
 

arch/arm/mach-exynos4/cpufreq.c out: · line 567

Quoted 10 lines
arch/arm/mach-exynos4/cpufreq.c +0 -2
-#ifdef CONFIG_REGULATOR
 	if (!IS_ERR(arm_regulator))
 		regulator_put(arm_regulator);
 
 	if (!IS_ERR(int_regulator))
 		regulator_put(int_regulator);
-#endif
 
 	printk(KERN_ERR "%s: failed initialization\n", __func__);
 

Ok, applied with Mark's description.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.