]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - arch/sh/mm/ioremap_64.c
Merge branch 'master' into sh/hwblk
[mv-sheeva.git] / arch / sh / mm / ioremap_64.c
index 2331229f81266720907ba21418ade0afabea4115..b16843d02b76f424051988266c58488d8c93951f 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/io.h>
 #include <linux/bootmem.h>
 #include <linux/proc_fs.h>
+#include <linux/slab.h>
 #include <asm/page.h>
 #include <asm/pgalloc.h>
 #include <asm/addrspace.h>
@@ -93,7 +94,6 @@ static struct resource *shmedia_find_resource(struct resource *root,
 static void __iomem *shmedia_alloc_io(unsigned long phys, unsigned long size,
                                      const char *name, unsigned long flags)
 {
-       static int printed_full;
        struct xresource *xres;
        struct resource *res;
        char *tack;
@@ -107,11 +107,8 @@ static void __iomem *shmedia_alloc_io(unsigned long phys, unsigned long size,
                tack = xres->xname;
                res = &xres->xres;
        } else {
-               if (!printed_full) {
-                       printk(KERN_NOTICE "%s: done with statics, "
+               printk_once(KERN_NOTICE "%s: done with statics, "
                               "switching to kmalloc\n", __func__);
-                       printed_full = 1;
-               }
                tlen = strlen(name);
                tack = kmalloc(sizeof(struct resource) + tlen + 1, GFP_KERNEL);
                if (!tack)
@@ -175,7 +172,7 @@ static __init_refok void *sh64_get_page(void)
 {
        void *page;
 
-       if (after_bootmem)
+       if (slab_is_available())
                page = (void *)get_zeroed_page(GFP_KERNEL);
        else
                page = alloc_bootmem_pages(PAGE_SIZE);