Blackfin: merge sram init functions
authorGraf Yang <graf.yang@analog.com>
Mon, 25 May 2009 04:44:00 +0000 (04:44 +0000)
committerMike Frysinger <vapier@gentoo.org>
Fri, 12 Jun 2009 10:11:50 +0000 (06:11 -0400)
Now that the sram_init() function exists only to call the bfin_sram_init()
after the punting of the reserve_pda() function, simply merge the two to
avoid pointless overhead.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
arch/blackfin/mm/blackfin_sram.h
arch/blackfin/mm/init.c
arch/blackfin/mm/sram-alloc.c

index 8cb0945..bc00628 100644 (file)
@@ -30,7 +30,6 @@
 #ifndef __BLACKFIN_SRAM_H__
 #define __BLACKFIN_SRAM_H__
 
-extern void bfin_sram_init(void);
 extern void *l1sram_alloc(size_t);
 
 #endif
index 9a62b30..014a55a 100644 (file)
@@ -175,15 +175,6 @@ void __init mem_init(void)
                initk, codek, datak, DMA_UNCACHED_REGION >> 10, (reservedpages << (PAGE_SHIFT-10)));
 }
 
-static int __init sram_init(void)
-{
-       /* Initialize the blackfin L1 Memory. */
-       bfin_sram_init();
-
-       return 0;
-}
-pure_initcall(sram_init);
-
 static void __init free_init_pages(const char *what, unsigned long begin, unsigned long end)
 {
        unsigned long addr;
index 530d139..36376d8 100644 (file)
@@ -223,7 +223,7 @@ static void __init l2_sram_init(void)
        spin_lock_init(&l2_sram_lock);
 }
 
-void __init bfin_sram_init(void)
+static int __init bfin_sram_init(void)
 {
        sram_piece_cache = kmem_cache_create("sram_piece_cache",
                                sizeof(struct sram_piece),
@@ -233,7 +233,10 @@ void __init bfin_sram_init(void)
        l1_data_sram_init();
        l1_inst_sram_init();
        l2_sram_init();
+
+       return 0;
 }
+pure_initcall(bfin_sram_init);
 
 /* SRAM allocate function */
 static void *_sram_alloc(size_t size, struct sram_piece *pfree_head,