#ifndef _HWBM_H #define _HWBM_H struct hwbm_pool { /* Capacity of the pool */ int size; /* Size of the buffers managed */ int frag_size; /* Number of buffers currently used by this pool */ int buf_num; /* constructor called during alocation */ int (*construct)(struct hwbm_pool *bm_pool, void *buf); /* protect acces to the buffer counter*/ spinlock_t lock; /* private data */ void *priv; }; #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, gfp_t gfp); #else void hwbm_buf_free(struct hwbm_pool *bm_pool, void *buf) {} int hwbm_pool_refill(struct hwbm_pool *bm_pool, gfp_t gfp) { return 0; } int hwbm_pool_add(struct hwbm_pool *bm_pool, unsigned int buf_num, gfp_t gfp) { return 0; } #endif /* CONFIG_HWBM */ #endif /* _HWBM_H */ net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>2014-05-25 23:50:39 +0400
committerMark Brown <broonie@linaro.org>2014-05-26 16:19:36 +0100
commit4127f696f9641afac8b8a05b9dd3dae48d384e08 (patch)
treecc89d3a5f95f1c0ec3afe0f3cad675c103b5682c /include
parentc9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff)
regulator: fixed: use of_property_read_{bool|u32}()
Use more compact of_property_read_{bool|u32}() calls instead of the of_{find|get}_property() calls. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'include')