aboutsummaryrefslogtreecommitdiffstats
path: root/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c
diff options
context:
space:
mode:
Diffstat (limited to 'unmodified_drivers/linux-2.6/platform-pci/platform-compat.c')
-rw-r--r--unmodified_drivers/linux-2.6/platform-pci/platform-compat.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c b/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c
index f7c8db7fcd..f3cef11620 100644
--- a/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c
+++ b/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c
@@ -4,6 +4,7 @@
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/sched.h>
+#include <linux/slab.h>
#include <xen/platform-compat.h>
@@ -97,3 +98,19 @@ signed long schedule_timeout_interruptible(signed long timeout)
}
EXPORT_SYMBOL(schedule_timeout_interruptible);
#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
+/**
+ * kzalloc - allocate memory. The memory is set to zero.
+ * @size: how many bytes of memory are required.
+ * @flags: the type of memory to allocate.
+ */
+void *kzalloc(size_t size, int flags)
+{
+ void *ret = kmalloc(size, flags);
+ if (ret)
+ memset(ret, 0, size);
+ return ret;
+}
+EXPORT_SYMBOL(kzalloc);
+#endif