From 8ffa257bfa36affebbca1505151b2cac42875e69 Mon Sep 17 00:00:00 2001 From: Thomas Graf Date: Mon, 12 Nov 2012 22:07:39 +0100 Subject: cache: Move nl_cache_ops_set_flags() to cache_mngt.c Signed-off-by: Thomas Graf --- lib/cache.c | 10 ---------- lib/cache_mngt.c | 13 +++++++++++++ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/lib/cache.c b/lib/cache.c index 6a0e71a..b776abf 100644 --- a/lib/cache.c +++ b/lib/cache.c @@ -566,16 +566,6 @@ void nl_cache_set_arg2(struct nl_cache *cache, int arg) cache->c_iarg2 = arg; } -/** - * Set cache ops flags - * @arg ops Cache ops - * @arg arg flags - */ -void nl_cache_ops_set_flags(struct nl_cache_ops *ops, unsigned int flags) -{ - ops->co_flags |= flags; -} - /** * Set cache flags * @arg cache Cache diff --git a/lib/cache_mngt.c b/lib/cache_mngt.c index 6691454..fa1ac22 100644 --- a/lib/cache_mngt.c +++ b/lib/cache_mngt.c @@ -129,6 +129,19 @@ void nl_cache_ops_foreach(void (*cb)(struct nl_cache_ops *, void *), void *arg) cb(ops, arg); } +/** + * Set default flags for caches of this type + * @arg ops Cache ops + * @arg flags Flags to set + * + * The cache operation flags will be derived to all caches allocates + * based on this set of cache operations. + */ +void nl_cache_ops_set_flags(struct nl_cache_ops *ops, unsigned int flags) +{ + ops->co_flags |= flags; +} + /** * Register a set of cache operations * @arg ops cache operations -- cgit v1.2.1