#ifndef _HWBM_H
#define _HWBM_H
#include <linux/mutex.h>
struct hwbm_pool { … };
#ifdef CONFIG_HWBM
void hwbm_buf_free(struct hwbm_pool *bm_pool, void *buf);
int hwbm_pool_refill(struct hwbm_pool *bm_pool, gfp_t gfp);
int hwbm_pool_add(struct hwbm_pool *bm_pool, unsigned int buf_num);
#else
static inline void hwbm_buf_free(struct hwbm_pool *bm_pool, void *buf) { … }
static inline int hwbm_pool_refill(struct hwbm_pool *bm_pool, gfp_t gfp)
{ … }
static inline int hwbm_pool_add(struct hwbm_pool *bm_pool,
unsigned int buf_num)
{ … }
#endif
#endif