aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/clkdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/kernel/clkdev.c')
-rw-r--r--arch/sh/kernel/clkdev.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/arch/sh/kernel/clkdev.c b/arch/sh/kernel/clkdev.c
index 29cd802ac388..defdd6e30908 100644
--- a/arch/sh/kernel/clkdev.c
+++ b/arch/sh/kernel/clkdev.c
@@ -20,6 +20,9 @@
20#include <linux/string.h> 20#include <linux/string.h>
21#include <linux/mutex.h> 21#include <linux/mutex.h>
22#include <linux/clk.h> 22#include <linux/clk.h>
23#include <linux/slab.h>
24#include <linux/bootmem.h>
25#include <linux/mm.h>
23#include <asm/clock.h> 26#include <asm/clock.h>
24#include <asm/clkdev.h> 27#include <asm/clkdev.h>
25 28
@@ -103,12 +106,16 @@ struct clk_lookup_alloc {
103 char con_id[MAX_CON_ID]; 106 char con_id[MAX_CON_ID];
104}; 107};
105 108
106struct clk_lookup *clkdev_alloc(struct clk *clk, const char *con_id, 109struct clk_lookup * __init_refok
107 const char *dev_fmt, ...) 110clkdev_alloc(struct clk *clk, const char *con_id, const char *dev_fmt, ...)
108{ 111{
109 struct clk_lookup_alloc *cla; 112 struct clk_lookup_alloc *cla;
110 113
111 cla = kzalloc(sizeof(*cla), GFP_KERNEL); 114 if (!slab_is_available())
115 cla = alloc_bootmem_low_pages(sizeof(*cla));
116 else
117 cla = kzalloc(sizeof(*cla), GFP_KERNEL);
118
112 if (!cla) 119 if (!cla)
113 return NULL; 120 return NULL;
114 121