kfifo_init — allocates a new FIFO using a preallocated buffer
struct kfifo * kfifo_init
(unsigned char * buffer, unsigned int size, gfp_t gfp_mask, spinlock_t * lock);
the preallocated buffer to be used.
the size of the internal buffer, this have to be a power of 2.
get_free_pages mask, passed to kmalloc
the lock to be used to protect the fifo buffer
Do NOT pass the kfifo to kfifo_free after use! Simply free the struct kfifo with kfree.