Changeset 3845

Show
Ignore:
Timestamp:
08/27/08 17:55:20 (4 months ago)
Author:
proski
Message:

Backport kzalloc() from trunk

It's needed for consistent crypto testing implementation in all
branches.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • madwifi/branches/madwifi-0.9.4/include/compat.h

    r3715 r3845  
    119119 
    120120#include <linux/version.h> 
     121#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) 
     122typedef int gfp_t; 
     123 
     124static inline void *kzalloc(size_t size, gfp_t flags) 
     125{ 
     126        void *p = kmalloc(size, flags); 
     127        if (likely(p != NULL)) 
     128                memset(p, 0, size); 
     129        return p; 
     130} 
     131#endif 
     132 
    121133#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21) 
    122134#define ATH_REGISTER_SYSCTL_TABLE(t) register_sysctl_table(t, 1)