* [PATCH] Exynos4: Remove meaningless REGULATOR config option
@ 2011-03-04 5:16 Kyungmin Park
2011-03-04 11:52 ` Sergei Shtylyov
2011-03-07 6:45 ` Kukjin Kim
0 siblings, 2 replies; 5+ messages in thread
From: Kyungmin Park @ 2011-03-04 5:16 UTC (permalink / raw)
To: linux-arm-kernel
From: Kyungmin Park <kyungmin.park@samsung.com>
reguration APIs are guarded at its header file
No need to define at codes.
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
diff --git a/arch/arm/mach-exynos4/cpufreq.c b/arch/arm/mach-exynos4/cpufreq.c
index 174f080..a16ac35 100644
--- a/arch/arm/mach-exynos4/cpufreq.c
+++ b/arch/arm/mach-exynos4/cpufreq.c
@@ -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__);
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] Exynos4: Remove meaningless REGULATOR config option
2011-03-04 5:16 [PATCH] Exynos4: Remove meaningless REGULATOR config option Kyungmin Park
@ 2011-03-04 11:52 ` Sergei Shtylyov
2011-03-04 12:40 ` Mark Brown
2011-03-07 6:45 ` Kukjin Kim
1 sibling, 1 reply; 5+ messages in thread
From: Sergei Shtylyov @ 2011-03-04 11:52 UTC (permalink / raw)
To: linux-arm-kernel
Hello.
On 04-03-2011 8:16, Kyungmin Park wrote:
> From: Kyungmin Park<kyungmin.park@samsung.com>
> reguration APIs are guarded at its header file
Regulation?
> No need to define at codes.
Can't understand this.
> Signed-off-by: Kyungmin Park<kyungmin.park@samsung.com>
WBR, Sergei
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] Exynos4: Remove meaningless REGULATOR config option
2011-03-04 11:52 ` Sergei Shtylyov
@ 2011-03-04 12:40 ` Mark Brown
2011-03-07 6:45 ` Kukjin Kim
0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2011-03-04 12:40 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Mar 04, 2011 at 02:52:53PM +0300, Sergei Shtylyov wrote:
> On 04-03-2011 8:16, Kyungmin Park wrote:
>> From: Kyungmin Park<kyungmin.park@samsung.com>
>> reguration APIs are guarded at its header file
> Regulation?
>> 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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] Exynos4: Remove meaningless REGULATOR config option
2011-03-04 12:40 ` Mark Brown
@ 2011-03-07 6:45 ` Kukjin Kim
0 siblings, 0 replies; 5+ messages in thread
From: Kukjin Kim @ 2011-03-07 6:45 UTC (permalink / raw)
To: linux-arm-kernel
Mark Brown wrote:
>
> On Fri, Mar 04, 2011 at 02:52:53PM +0300, Sergei Shtylyov wrote:
> > On 04-03-2011 8:16, Kyungmin Park wrote:
>
> >> From: Kyungmin Park<kyungmin.park@samsung.com>
>
> >> reguration APIs are guarded at its header file
>
> > Regulation?
>
> >> 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 <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] Exynos4: Remove meaningless REGULATOR config option
2011-03-04 5:16 [PATCH] Exynos4: Remove meaningless REGULATOR config option Kyungmin Park
2011-03-04 11:52 ` Sergei Shtylyov
@ 2011-03-07 6:45 ` Kukjin Kim
1 sibling, 0 replies; 5+ messages in thread
From: Kukjin Kim @ 2011-03-07 6:45 UTC (permalink / raw)
To: linux-arm-kernel
Kyungmin Park wrote:
>
> From: Kyungmin Park <kyungmin.park@samsung.com>
>
> reguration APIs are guarded at its header file
> No need to define at codes.
>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> diff --git a/arch/arm/mach-exynos4/cpufreq.c b/arch/arm/mach-
> exynos4/cpufreq.c
> index 174f080..a16ac35 100644
> --- a/arch/arm/mach-exynos4/cpufreq.c
> +++ b/arch/arm/mach-exynos4/cpufreq.c
> @@ -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__);
>
Ok, applied with Mark's description.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-03-07 6:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-04 5:16 [PATCH] Exynos4: Remove meaningless REGULATOR config option Kyungmin Park
2011-03-04 11:52 ` Sergei Shtylyov
2011-03-04 12:40 ` Mark Brown
2011-03-07 6:45 ` Kukjin Kim
2011-03-07 6:45 ` Kukjin Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).