Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / drivers / ieee1394 / csr1212.h
index e7f1d30..cecd587 100644 (file)
 #include <linux/types.h>
 #include <linux/slab.h>
 #include <linux/interrupt.h>
-#include <linux/sched.h>
+#include <linux/vmalloc.h>
+#include <asm/pgalloc.h>
 
-#define CSR1212_MALLOC(size)           kmalloc((size), in_interrupt() ? GFP_ATOMIC : GFP_KERNEL)
-#define CSR1212_FREE(ptr)              kfree(ptr)
+#define CSR1212_MALLOC(size)           vmalloc((size))
+#define CSR1212_FREE(ptr)              vfree(ptr)
 #define CSR1212_BE16_TO_CPU(quad)      be16_to_cpu(quad)
 #define CSR1212_CPU_TO_BE16(quad)      cpu_to_be16(quad)
 #define CSR1212_BE32_TO_CPU(quad)      be32_to_cpu(quad)
@@ -645,7 +646,7 @@ static inline struct csr1212_csr_rom_cache *csr1212_rom_cache_malloc(u_int32_t o
 {
        struct csr1212_csr_rom_cache *cache;
 
-       cache = CSR1212_MALLOC(sizeof(struct csr1212_csr_rom_cache) + size);
+       cache = CSR1212_MALLOC(sizeof(*cache) + size);
        if (!cache)
                return NULL;