]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
sh/kernel/ cleanups
authorAdrian Bunk <bunk@kernel.org>
Wed, 18 Jun 2008 00:36:50 +0000 (03:36 +0300)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 28 Jul 2008 09:10:30 +0000 (18:10 +0900)
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>
arch/sh/kernel/cf-enabler.c
arch/sh/kernel/cpu/clock.c
arch/sh/kernel/process_32.c
arch/sh/kernel/process_64.c
arch/sh/kernel/time_32.c
arch/sh/kernel/timers/timer-tmu.c
include/asm-sh/clock.h
include/asm-sh/system.h
include/asm-sh/timer.h

index 01ff4d05aab0303c38cdad719302db33fd904a59..d3d9f32042302f42f2788ba1fd9fe58069553fff 100644 (file)
@@ -157,7 +157,7 @@ static int __init cf_init_se(void)
 }
 #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();
index b5f1e23ed57cc3ef68a7bc6f05560f133fd0c8a2..73334c689e9d860d8f66d3916f86b64cc7291458 100644 (file)
@@ -88,7 +88,7 @@ static void propagate_rate(struct clk *clk)
        }
 }
 
-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 @@ int __clk_enable(struct clk *clk)
 
        return 0;
 }
-EXPORT_SYMBOL_GPL(__clk_enable);
 
 int clk_enable(struct clk *clk)
 {
@@ -131,7 +130,7 @@ static void clk_kref_release(struct kref *kref)
        /* 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 @@ void __clk_disable(struct clk *clk)
                        clk->ops->disable(clk);
        }
 }
-EXPORT_SYMBOL_GPL(__clk_disable);
 
 void clk_disable(struct clk *clk)
 {
index 921892c351dac9884482516331b20dd1a5a068bf..3326a45749d9ee2c0af9c9c35b4934cc57c487d9 100644 (file)
@@ -34,18 +34,6 @@ void (*pm_idle)(void);
 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 @@ static int __init hlt_setup(char *__unused)
 }
 __setup("hlt", hlt_setup);
 
-void default_idle(void)
+static void default_idle(void)
 {
        if (!hlt_counter) {
                clear_thread_flag(TIF_POLLING_NRFLAG);
index 0283d8133075b0507d04d5ca5417a3a6c1425017..b9dbd2d3b4a5845624829c547ed613c8fe259b51 100644 (file)
@@ -36,16 +36,6 @@ static int hlt_counter = 1;
 
 #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;
index 7281342c044d6dd24247ea33fa89060c687fbc88..0758b5ee818079b3fd2f3948da6dfe7af5825d0b 100644 (file)
@@ -211,7 +211,7 @@ unsigned long sh_hpt_frequency = 0;
 
 #define NSEC_PER_CYC_SHIFT     10
 
-struct clocksource clocksource_sh = {
+static struct clocksource clocksource_sh = {
        .name           = "SuperH",
        .rating         = 200,
        .mask           = CLOCKSOURCE_MASK(32),
index 8935570008d2eb192d9d6698c2b4580ea3c0882c..1ca9ad49b54145c89b001d24371b40876751ba49 100644 (file)
@@ -209,7 +209,7 @@ static int tmu_timer_init(void)
        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,
index b550a27a7042c85bc856a39b0eec86dcba0ca9a8..608fda55c0ea729c615f35e2382186b24ce0c800 100644 (file)
@@ -41,9 +41,6 @@ void arch_init_clk_ops(struct clk_ops **, int type);
 /* 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 *);
index e65b6b822cb3722731cf5d4d5bb21673050ac9bb..056d68cd21080e36b4e4a1ad56952751592b8a12 100644 (file)
@@ -148,14 +148,6 @@ extern unsigned long cached_to_uncached;
 
 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);
index 701ba84c7049305dd1e763efe671bfbf15ed9439..327f7eb8976aeba1c04068f0c4570867131072b3 100644 (file)
@@ -40,6 +40,5 @@ struct sys_timer *get_sys_timer(void);
 /* 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 */