summaryrefslogtreecommitdiffstats
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 @@
#include <linux/string.h>
#include <linux/mutex.h>
#include <linux/clk.h>
+#include <linux/slab.h>
+#include <linux/bootmem.h>
+#include <linux/mm.h>
#include <asm/clock.h>
#include <asm/clkdev.h>
@@ -103,12 +106,16 @@ struct clk_lookup_alloc {
char con_id[MAX_CON_ID];
};
-struct clk_lookup *clkdev_alloc(struct clk *clk, const char *con_id,
- const char *dev_fmt, ...)
+struct clk_lookup * __init_refok
+clkdev_alloc(struct clk *clk, const char *con_id, const char *dev_fmt, ...)
{
struct clk_lookup_alloc *cla;
- cla = kzalloc(sizeof(*cla), GFP_KERNEL);
+ if (!slab_is_available())
+ cla = alloc_bootmem_low_pages(sizeof(*cla));
+ else
+ cla = kzalloc(sizeof(*cla), GFP_KERNEL);
+
if (!cla)
return NULL;
OpenPOWER on IntegriCloud