diff options
author | Adrian Bunk <bunk@kernel.org> | 2008-06-17 20:36:50 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-07-28 05:10:30 -0400 |
commit | 4c1cfab1e0f9a41246cfdcca78f3700fb67f0a5c (patch) | |
tree | 502610786625ef7fe15d89e4226cd05b6dcd2d44 | |
parent | 62410034e79d9249647d1fe6f6f35a06b3747e68 (diff) |
sh/kernel/ cleanups
This patch contains the following cleanups:
- make the following needlessly global code static:
- cf-enabler.c: cf_init()
- cpu/clock.c: __clk_enable()
- cpu/clock.c: __clk_disable()
- process_32.c: default_idle()
- time_32.c: struct clocksource_sh
- timers/timer-tmu.c: struct tmu_timer_ops
- remove the following unused functions (no CONFIG_BLK_DEV_FD on sh):
- process_{32,64}.c: disable_hlt()
- process_{32,64}.c: enable_hlt()
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r-- | arch/sh/kernel/cf-enabler.c | 2 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/clock.c | 6 | ||||
-rw-r--r-- | arch/sh/kernel/process_32.c | 14 | ||||
-rw-r--r-- | arch/sh/kernel/process_64.c | 10 | ||||
-rw-r--r-- | arch/sh/kernel/time_32.c | 2 | ||||
-rw-r--r-- | arch/sh/kernel/timers/timer-tmu.c | 2 | ||||
-rw-r--r-- | include/asm-sh/clock.h | 3 | ||||
-rw-r--r-- | include/asm-sh/system.h | 8 | ||||
-rw-r--r-- | include/asm-sh/timer.h | 1 |
9 files changed, 6 insertions, 42 deletions
diff --git a/arch/sh/kernel/cf-enabler.c b/arch/sh/kernel/cf-enabler.c index 01ff4d05aab0..d3d9f3204230 100644 --- a/arch/sh/kernel/cf-enabler.c +++ b/arch/sh/kernel/cf-enabler.c | |||
@@ -157,7 +157,7 @@ static int __init cf_init_se(void) | |||
157 | } | 157 | } |
158 | #endif | 158 | #endif |
159 | 159 | ||
160 | int __init cf_init(void) | 160 | static int __init cf_init(void) |
161 | { | 161 | { |
162 | if (mach_is_se() || mach_is_7722se() || mach_is_7721se()) | 162 | if (mach_is_se() || mach_is_7722se() || mach_is_7721se()) |
163 | return cf_init_se(); | 163 | return cf_init_se(); |
diff --git a/arch/sh/kernel/cpu/clock.c b/arch/sh/kernel/cpu/clock.c index b5f1e23ed57c..73334c689e9d 100644 --- a/arch/sh/kernel/cpu/clock.c +++ b/arch/sh/kernel/cpu/clock.c | |||
@@ -88,7 +88,7 @@ static void propagate_rate(struct clk *clk) | |||
88 | } | 88 | } |
89 | } | 89 | } |
90 | 90 | ||
91 | int __clk_enable(struct clk *clk) | 91 | static int __clk_enable(struct clk *clk) |
92 | { | 92 | { |
93 | /* | 93 | /* |
94 | * See if this is the first time we're enabling the clock, some | 94 | * See if this is the first time we're enabling the clock, some |
@@ -111,7 +111,6 @@ int __clk_enable(struct clk *clk) | |||
111 | 111 | ||
112 | return 0; | 112 | return 0; |
113 | } | 113 | } |
114 | EXPORT_SYMBOL_GPL(__clk_enable); | ||
115 | 114 | ||
116 | int clk_enable(struct clk *clk) | 115 | int clk_enable(struct clk *clk) |
117 | { | 116 | { |
@@ -131,7 +130,7 @@ static void clk_kref_release(struct kref *kref) | |||
131 | /* Nothing to do */ | 130 | /* Nothing to do */ |
132 | } | 131 | } |
133 | 132 | ||
134 | void __clk_disable(struct clk *clk) | 133 | static void __clk_disable(struct clk *clk) |
135 | { | 134 | { |
136 | int count = kref_put(&clk->kref, clk_kref_release); | 135 | int count = kref_put(&clk->kref, clk_kref_release); |
137 | 136 | ||
@@ -143,7 +142,6 @@ void __clk_disable(struct clk *clk) | |||
143 | clk->ops->disable(clk); | 142 | clk->ops->disable(clk); |
144 | } | 143 | } |
145 | } | 144 | } |
146 | EXPORT_SYMBOL_GPL(__clk_disable); | ||
147 | 145 | ||
148 | void clk_disable(struct clk *clk) | 146 | void clk_disable(struct clk *clk) |
149 | { | 147 | { |
diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c index 921892c351da..3326a45749d9 100644 --- a/arch/sh/kernel/process_32.c +++ b/arch/sh/kernel/process_32.c | |||
@@ -34,18 +34,6 @@ void (*pm_idle)(void); | |||
34 | void (*pm_power_off)(void); | 34 | void (*pm_power_off)(void); |
35 | EXPORT_SYMBOL(pm_power_off); | 35 | EXPORT_SYMBOL(pm_power_off); |
36 | 36 | ||
37 | void disable_hlt(void) | ||
38 | { | ||
39 | hlt_counter++; | ||
40 | } | ||
41 | EXPORT_SYMBOL(disable_hlt); | ||
42 | |||
43 | void enable_hlt(void) | ||
44 | { | ||
45 | hlt_counter--; | ||
46 | } | ||
47 | EXPORT_SYMBOL(enable_hlt); | ||
48 | |||
49 | static int __init nohlt_setup(char *__unused) | 37 | static int __init nohlt_setup(char *__unused) |
50 | { | 38 | { |
51 | hlt_counter = 1; | 39 | hlt_counter = 1; |
@@ -60,7 +48,7 @@ static int __init hlt_setup(char *__unused) | |||
60 | } | 48 | } |
61 | __setup("hlt", hlt_setup); | 49 | __setup("hlt", hlt_setup); |
62 | 50 | ||
63 | void default_idle(void) | 51 | static void default_idle(void) |
64 | { | 52 | { |
65 | if (!hlt_counter) { | 53 | if (!hlt_counter) { |
66 | clear_thread_flag(TIF_POLLING_NRFLAG); | 54 | clear_thread_flag(TIF_POLLING_NRFLAG); |
diff --git a/arch/sh/kernel/process_64.c b/arch/sh/kernel/process_64.c index 0283d8133075..b9dbd2d3b4a5 100644 --- a/arch/sh/kernel/process_64.c +++ b/arch/sh/kernel/process_64.c | |||
@@ -36,16 +36,6 @@ static int hlt_counter = 1; | |||
36 | 36 | ||
37 | #define HARD_IDLE_TIMEOUT (HZ / 3) | 37 | #define HARD_IDLE_TIMEOUT (HZ / 3) |
38 | 38 | ||
39 | void disable_hlt(void) | ||
40 | { | ||
41 | hlt_counter++; | ||
42 | } | ||
43 | |||
44 | void enable_hlt(void) | ||
45 | { | ||
46 | hlt_counter--; | ||
47 | } | ||
48 | |||
49 | static int __init nohlt_setup(char *__unused) | 39 | static int __init nohlt_setup(char *__unused) |
50 | { | 40 | { |
51 | hlt_counter = 1; | 41 | hlt_counter = 1; |
diff --git a/arch/sh/kernel/time_32.c b/arch/sh/kernel/time_32.c index 7281342c044d..0758b5ee8180 100644 --- a/arch/sh/kernel/time_32.c +++ b/arch/sh/kernel/time_32.c | |||
@@ -211,7 +211,7 @@ unsigned long sh_hpt_frequency = 0; | |||
211 | 211 | ||
212 | #define NSEC_PER_CYC_SHIFT 10 | 212 | #define NSEC_PER_CYC_SHIFT 10 |
213 | 213 | ||
214 | struct clocksource clocksource_sh = { | 214 | static struct clocksource clocksource_sh = { |
215 | .name = "SuperH", | 215 | .name = "SuperH", |
216 | .rating = 200, | 216 | .rating = 200, |
217 | .mask = CLOCKSOURCE_MASK(32), | 217 | .mask = CLOCKSOURCE_MASK(32), |
diff --git a/arch/sh/kernel/timers/timer-tmu.c b/arch/sh/kernel/timers/timer-tmu.c index 8935570008d2..1ca9ad49b541 100644 --- a/arch/sh/kernel/timers/timer-tmu.c +++ b/arch/sh/kernel/timers/timer-tmu.c | |||
@@ -209,7 +209,7 @@ static int tmu_timer_init(void) | |||
209 | return 0; | 209 | return 0; |
210 | } | 210 | } |
211 | 211 | ||
212 | struct sys_timer_ops tmu_timer_ops = { | 212 | static struct sys_timer_ops tmu_timer_ops = { |
213 | .init = tmu_timer_init, | 213 | .init = tmu_timer_init, |
214 | .start = tmu_timer_start, | 214 | .start = tmu_timer_start, |
215 | .stop = tmu_timer_stop, | 215 | .stop = tmu_timer_stop, |
diff --git a/include/asm-sh/clock.h b/include/asm-sh/clock.h index b550a27a7042..608fda55c0ea 100644 --- a/include/asm-sh/clock.h +++ b/include/asm-sh/clock.h | |||
@@ -41,9 +41,6 @@ void arch_init_clk_ops(struct clk_ops **, int type); | |||
41 | /* arch/sh/kernel/cpu/clock.c */ | 41 | /* arch/sh/kernel/cpu/clock.c */ |
42 | int clk_init(void); | 42 | int clk_init(void); |
43 | 43 | ||
44 | int __clk_enable(struct clk *); | ||
45 | void __clk_disable(struct clk *); | ||
46 | |||
47 | void clk_recalc_rate(struct clk *); | 44 | void clk_recalc_rate(struct clk *); |
48 | 45 | ||
49 | int clk_register(struct clk *); | 46 | int clk_register(struct clk *); |
diff --git a/include/asm-sh/system.h b/include/asm-sh/system.h index e65b6b822cb3..056d68cd2108 100644 --- a/include/asm-sh/system.h +++ b/include/asm-sh/system.h | |||
@@ -148,14 +148,6 @@ extern unsigned long cached_to_uncached; | |||
148 | 148 | ||
149 | extern struct dentry *sh_debugfs_root; | 149 | extern struct dentry *sh_debugfs_root; |
150 | 150 | ||
151 | /* XXX | ||
152 | * disable hlt during certain critical i/o operations | ||
153 | */ | ||
154 | #define HAVE_DISABLE_HLT | ||
155 | void disable_hlt(void); | ||
156 | void enable_hlt(void); | ||
157 | |||
158 | void default_idle(void); | ||
159 | void per_cpu_trap_init(void); | 151 | void per_cpu_trap_init(void); |
160 | 152 | ||
161 | asmlinkage void break_point_trap(void); | 153 | asmlinkage void break_point_trap(void); |
diff --git a/include/asm-sh/timer.h b/include/asm-sh/timer.h index 701ba84c7049..327f7eb8976a 100644 --- a/include/asm-sh/timer.h +++ b/include/asm-sh/timer.h | |||
@@ -40,6 +40,5 @@ struct sys_timer *get_sys_timer(void); | |||
40 | /* arch/sh/kernel/time.c */ | 40 | /* arch/sh/kernel/time.c */ |
41 | void handle_timer_tick(void); | 41 | void handle_timer_tick(void); |
42 | extern unsigned long sh_hpt_frequency; | 42 | extern unsigned long sh_hpt_frequency; |
43 | extern struct clocksource clocksource_sh; | ||
44 | 43 | ||
45 | #endif /* __ASM_SH_TIMER_H */ | 44 | #endif /* __ASM_SH_TIMER_H */ |