summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2023-01-17 16:07:18 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2023-01-17 16:07:18 +0100
commitd4d9c75f96dccd673104ada4a9a19149325ace89 (patch)
tree49dea856fd9c13c1e6f9c82d09829e93e24dbe37 /include/linux
parent26b942ded55dda5a701c9fd01d5ac771cab3578e (diff)
parent905e124f1c476f79d863e028934c6881ee4ee3be (diff)
downloadbarebox-d4d9c75f96dccd673104ada4a9a19149325ace89.tar.gz
Merge branch 'for-next/kernelcode-helpers' into HEAD
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/barebox-wrapper.h1
-rw-r--r--include/linux/clk.h2
-rw-r--r--include/linux/slab.h13
3 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/barebox-wrapper.h b/include/linux/barebox-wrapper.h
index 83fa9223de..8f2473abe8 100644
--- a/include/linux/barebox-wrapper.h
+++ b/include/linux/barebox-wrapper.h
@@ -20,6 +20,7 @@ static inline void vfree(const void *addr)
#define MODULE_DESCRIPTION(x)
#define MODULE_LICENSE(x)
#define MODULE_ALIAS(x)
+#define MODULE_DEVICE_TABLE(bus, table)
#define __user
#define __init
diff --git a/include/linux/clk.h b/include/linux/clk.h
index 4cece8ba5e..bffed2bdcf 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -71,6 +71,7 @@ struct clk *clk_get(struct device *dev, const char *id);
* Returns success (0) or negative errno.
*/
int clk_enable(struct clk *clk);
+#define clk_prepare_enable(clk) clk_enable(clk)
/**
* clk_disable - inform the system when the clock source is no longer required.
@@ -85,6 +86,7 @@ int clk_enable(struct clk *clk);
* disabled.
*/
void clk_disable(struct clk *clk);
+#define clk_disable_unprepare(clk) clk_disable(clk)
/**
* clk_get_rate - obtain the current clock rate (in Hz) for a clock source.
diff --git a/include/linux/slab.h b/include/linux/slab.h
index eb14c58e34..dc80808938 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -3,6 +3,9 @@
#ifndef _LINUX_SLAB_H
#define _LINUX_SLAB_H
+#include <malloc.h>
+#include <linux/string.h>
+
#define SLAB_CONSISTENCY_CHECKS 0
#define SLAB_RED_ZONE 0
#define SLAB_POISON 0
@@ -103,6 +106,16 @@ static inline void *kcalloc(size_t n, size_t size, gfp_t flags)
return calloc(n, size);
}
+static inline void *krealloc(void *ptr, size_t size, gfp_t flags)
+{
+ return realloc(ptr, size);
+}
+
+static inline char *kstrdup(const char *str, gfp_t flags)
+{
+ return strdup(str);
+}
+
#define kstrdup_const(str, flags) strdup(str)
#define kfree_const(ptr) kfree((void *)ptr)