aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/wilc1000/wilc_memory.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2015-07-07 12:35:33 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2015-07-07 12:35:33 +0100
commit06be5eefe1192eb8ce8d07497f67595b6bfe9741 (patch)
tree80f1987d4970f8079681f8be0c135cafc8d6329a /drivers/staging/wilc1000/wilc_memory.c
parentARM: fix lockdep unannotated irqs-off warning (diff)
parentARM: avoid unwanted GCC memset()/memcpy() optimisations for IO variants (diff)
downloadlinux-dev-06be5eefe1192eb8ce8d07497f67595b6bfe9741.tar.xz
linux-dev-06be5eefe1192eb8ce8d07497f67595b6bfe9741.zip
Merge branches 'fixes' and 'ioremap' into for-linus
Diffstat (limited to 'drivers/staging/wilc1000/wilc_memory.c')
-rw-r--r--drivers/staging/wilc1000/wilc_memory.c58
1 files changed, 58 insertions, 0 deletions
diff --git a/drivers/staging/wilc1000/wilc_memory.c b/drivers/staging/wilc1000/wilc_memory.c
new file mode 100644
index 000000000000..c70707fefb66
--- /dev/null
+++ b/drivers/staging/wilc1000/wilc_memory.c
@@ -0,0 +1,58 @@
+
+#include "wilc_memory.h"
+
+/*!
+ * @author syounan
+ * @date 18 Aug 2010
+ * @version 1.0
+ */
+void *WILC_MemoryAlloc(u32 u32Size, tstrWILC_MemoryAttrs *strAttrs,
+ char *pcFileName, u32 u32LineNo)
+{
+ if (u32Size > 0) {
+ return kmalloc(u32Size, GFP_ATOMIC);
+ } else {
+ return NULL;
+ }
+}
+
+/*!
+ * @author syounan
+ * @date 18 Aug 2010
+ * @version 1.0
+ */
+void *WILC_MemoryCalloc(u32 u32Size, tstrWILC_MemoryAttrs *strAttrs,
+ char *pcFileName, u32 u32LineNo)
+{
+ return kcalloc(u32Size, 1, GFP_KERNEL);
+}
+
+/*!
+ * @author syounan
+ * @date 18 Aug 2010
+ * @version 1.0
+ */
+void *WILC_MemoryRealloc(void *pvOldBlock, u32 u32NewSize,
+ tstrWILC_MemoryAttrs *strAttrs, char *pcFileName, u32 u32LineNo)
+{
+ if (u32NewSize == 0) {
+ kfree(pvOldBlock);
+ return NULL;
+ } else if (pvOldBlock == NULL) {
+ return kmalloc(u32NewSize, GFP_KERNEL);
+ } else {
+ return krealloc(pvOldBlock, u32NewSize, GFP_KERNEL);
+ }
+
+}
+
+/*!
+ * @author syounan
+ * @date 18 Aug 2010
+ * @version 1.0
+ */
+void WILC_MemoryFree(const void *pvBlock, tstrWILC_MemoryAttrs *strAttrs,
+ char *pcFileName, u32 u32LineNo)
+{
+ kfree(pvBlock);
+}