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>
diff --git a/arch/sh/kernel/cf-enabler.c b/arch/sh/kernel/cf-enabler.c
index 01ff4d0..d3d9f32 100644
--- a/arch/sh/kernel/cf-enabler.c
+++ b/arch/sh/kernel/cf-enabler.c
@@ -157,7 +157,7 @@
}
#endif
-int __init cf_init(void)
+static int __init cf_init(void)
{
if (mach_is_se() || mach_is_7722se() || mach_is_7721se())
return cf_init_se();
diff --git a/arch/sh/kernel/cpu/clock.c b/arch/sh/kernel/cpu/clock.c
index b5f1e23..73334c6 100644
--- a/arch/sh/kernel/cpu/clock.c
+++ b/arch/sh/kernel/cpu/clock.c
@@ -88,7 +88,7 @@
}
}
-int __clk_enable(struct clk *clk)
+static int __clk_enable(struct clk *clk)
{
/*
* See if this is the first time we're enabling the clock, some
@@ -111,7 +111,6 @@
return 0;
}
-EXPORT_SYMBOL_GPL(__clk_enable);
int clk_enable(struct clk *clk)
{
@@ -131,7 +130,7 @@
/* Nothing to do */
}
-void __clk_disable(struct clk *clk)
+static void __clk_disable(struct clk *clk)
{
int count = kref_put(&clk->kref, clk_kref_release);
@@ -143,7 +142,6 @@
clk->ops->disable(clk);
}
}
-EXPORT_SYMBOL_GPL(__clk_disable);
void clk_disable(struct clk *clk)
{
diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c
index 921892c..3326a45 100644
--- a/arch/sh/kernel/process_32.c
+++ b/arch/sh/kernel/process_32.c
@@ -34,18 +34,6 @@
void (*pm_power_off)(void);
EXPORT_SYMBOL(pm_power_off);
-void disable_hlt(void)
-{
- hlt_counter++;
-}
-EXPORT_SYMBOL(disable_hlt);
-
-void enable_hlt(void)
-{
- hlt_counter--;
-}
-EXPORT_SYMBOL(enable_hlt);
-
static int __init nohlt_setup(char *__unused)
{
hlt_counter = 1;
@@ -60,7 +48,7 @@
}
__setup("hlt", hlt_setup);
-void default_idle(void)
+static void default_idle(void)
{
if (!hlt_counter) {
clear_thread_flag(TIF_POLLING_NRFLAG);
diff --git a/arch/sh/kernel/process_64.c b/arch/sh/kernel/process_64.c
index 0283d81..b9dbd2d 100644
--- a/arch/sh/kernel/process_64.c
+++ b/arch/sh/kernel/process_64.c
@@ -36,16 +36,6 @@
#define HARD_IDLE_TIMEOUT (HZ / 3)
-void disable_hlt(void)
-{
- hlt_counter++;
-}
-
-void enable_hlt(void)
-{
- hlt_counter--;
-}
-
static int __init nohlt_setup(char *__unused)
{
hlt_counter = 1;
diff --git a/arch/sh/kernel/time_32.c b/arch/sh/kernel/time_32.c
index 7281342..0758b5e 100644
--- a/arch/sh/kernel/time_32.c
+++ b/arch/sh/kernel/time_32.c
@@ -211,7 +211,7 @@
#define NSEC_PER_CYC_SHIFT 10
-struct clocksource clocksource_sh = {
+static struct clocksource clocksource_sh = {
.name = "SuperH",
.rating = 200,
.mask = CLOCKSOURCE_MASK(32),
diff --git a/arch/sh/kernel/timers/timer-tmu.c b/arch/sh/kernel/timers/timer-tmu.c
index 8935570..1ca9ad4 100644
--- a/arch/sh/kernel/timers/timer-tmu.c
+++ b/arch/sh/kernel/timers/timer-tmu.c
@@ -209,7 +209,7 @@
return 0;
}
-struct sys_timer_ops tmu_timer_ops = {
+static struct sys_timer_ops tmu_timer_ops = {
.init = tmu_timer_init,
.start = tmu_timer_start,
.stop = tmu_timer_stop,
diff --git a/include/asm-sh/clock.h b/include/asm-sh/clock.h
index b550a27..608fda5 100644
--- a/include/asm-sh/clock.h
+++ b/include/asm-sh/clock.h
@@ -41,9 +41,6 @@
/* arch/sh/kernel/cpu/clock.c */
int clk_init(void);
-int __clk_enable(struct clk *);
-void __clk_disable(struct clk *);
-
void clk_recalc_rate(struct clk *);
int clk_register(struct clk *);
diff --git a/include/asm-sh/system.h b/include/asm-sh/system.h
index e65b6b8..056d68c 100644
--- a/include/asm-sh/system.h
+++ b/include/asm-sh/system.h
@@ -148,14 +148,6 @@
extern struct dentry *sh_debugfs_root;
-/* XXX
- * disable hlt during certain critical i/o operations
- */
-#define HAVE_DISABLE_HLT
-void disable_hlt(void);
-void enable_hlt(void);
-
-void default_idle(void);
void per_cpu_trap_init(void);
asmlinkage void break_point_trap(void);
diff --git a/include/asm-sh/timer.h b/include/asm-sh/timer.h
index 701ba84..327f7eb 100644
--- a/include/asm-sh/timer.h
+++ b/include/asm-sh/timer.h
@@ -40,6 +40,5 @@
/* arch/sh/kernel/time.c */
void handle_timer_tick(void);
extern unsigned long sh_hpt_frequency;
-extern struct clocksource clocksource_sh;
#endif /* __ASM_SH_TIMER_H */