/* Returns the pointer of the buffer, or NULL if no enoguh memory.  */
void* snd_malloc_pages(size_t size, gfp_t gfp_flags)
/* Returns the pointer of the buffer, or NULL if no enoguh memory.  */
void* snd_malloc_pages(size_t size, gfp_t gfp_flags)
{
	int pg;
	void *res;
	if (WARN_ON(!size))
		return NULL;
	if (WARN_ON(!gfp_flags))
		return NULL;
	gfp_flags |= __GFP_COMP;
	pg = get_order(size);
	if ((res = (void *) __get_free_pages(gfp_flags, pg)) != NULL)
		inc_snd_pages(pg);
	return res;
}