summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ieee1394/csr1212.c4
-rw-r--r--drivers/ieee1394/csr1212.h6
2 files changed, 6 insertions, 4 deletions
diff --git a/drivers/ieee1394/csr1212.c b/drivers/ieee1394/csr1212.c
index 6c2f55bb9463..2fd465ec94ec 100644
--- a/drivers/ieee1394/csr1212.c
+++ b/drivers/ieee1394/csr1212.c
@@ -932,7 +932,9 @@ static void csr1212_fill_cache(struct csr1212_csr_rom_cache *cache)
}
}
-#define CSR1212_EXTENDED_ROM_SIZE (0x10000 * sizeof(u32))
+/* This size is arbitrarily chosen.
+ * The struct overhead is subtracted for more economic allocations. */
+#define CSR1212_EXTENDED_ROM_SIZE (2048 - sizeof(struct csr1212_csr_rom_cache))
int csr1212_generate_csr_image(struct csr1212_csr *csr)
{
diff --git a/drivers/ieee1394/csr1212.h b/drivers/ieee1394/csr1212.h
index 655827527ecc..cc23f3abe0cd 100644
--- a/drivers/ieee1394/csr1212.h
+++ b/drivers/ieee1394/csr1212.h
@@ -31,10 +31,10 @@
#define __CSR1212_H__
#include <linux/types.h>
-#include <linux/vmalloc.h>
+#include <linux/slab.h>
-#define CSR1212_MALLOC(size) vmalloc((size))
-#define CSR1212_FREE(ptr) vfree(ptr)
+#define CSR1212_MALLOC(size) kmalloc((size), GFP_KERNEL)
+#define CSR1212_FREE(ptr) kfree(ptr)
#define CSR1212_SUCCESS (0)