util: Add resource_attr_supported_always() function 19/272419/1
authorDongwoo Lee <dwoo08.lee@samsung.com>
Tue, 15 Mar 2022 11:19:20 +0000 (20:19 +0900)
committerDongwoo Lee <dwoo08.lee@samsung.com>
Wed, 16 Mar 2022 08:49:13 +0000 (17:49 +0900)
This provides common callback to is_supported operation of attribute
for supporting always available attributes.

Change-Id: Iba5058e03cf583693a897684093cf5d35573be33
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
include/util/resource.h

index ec1f496..18ce421 100644 (file)
@@ -172,6 +172,13 @@ struct resource_attribute_value *
 get_resource_attr_value(struct resource *resource, u_int64_t attr_id);
 bool is_resource_attr_supported(struct resource *resource, u_int64_t attr_id);
 
+static inline bool
+resource_attr_supported_always(const struct resource *resource,
+                              const struct resource_attribute *attr)
+{
+       return true;
+}
+
 int get_resource_attr_int(struct resource *resource, u_int64_t attr_id, int32_t *data);
 int get_resource_attr_int64(struct resource *resource, u_int64_t attr_id, int64_t *data);
 int get_resource_attr_uint(struct resource *resource, u_int64_t attr_id, u_int32_t *data);