diff options
author | Yang Xiong <Yang.Xiong@amd.com> | 2020-04-28 23:22:10 +0800 |
---|---|---|
committer | Yang Xiong <Yang.Xiong@amd.com> | 2020-04-30 10:34:14 +0800 |
commit | c124075d8cf4ab195d997ed22a1abebe9237c613 (patch) | |
tree | 3a3637bbccf154b73b711b87e19c34f3a5baa476 /include | |
parent | ac00b41936db273c6a6c52e116f0e9f25ffa72c8 (diff) |
drm/amdkcl: Test whether list_rotate_to_front() and list_is_first() is available
Signed-off-by: Yang Xiong <Yang.Xiong@amd.com>
Reviewed-by: Yifan Zhang <yifan1.zhang@amd.com>
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com>
Change-Id: Ifcd6b9a3b6362e9eb56f88e0490a594204712dbd
Diffstat (limited to 'include')
-rw-r--r-- | include/kcl/kcl_list.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/kcl/kcl_list.h b/include/kcl/kcl_list.h index 97148db6774d..64f01a8a3204 100644 --- a/include/kcl/kcl_list.h +++ b/include/kcl/kcl_list.h @@ -18,4 +18,22 @@ static inline void list_bulk_move_tail(struct list_head *head, } #endif +#if !defined(HAVE_LIST_ROTATE_TO_FRONT) +#include <linux/list.h> +static inline void list_rotate_to_front(struct list_head *list, + struct list_head *head) +{ + list_move_tail(head, list); +} +#endif + +#if !defined(HAVE_LIST_IS_FIRST) +#include <linux/list.h> +static inline int list_is_first(const struct list_head *list, + const struct list_head *head) +{ + return list->prev == head; +} +#endif + #endif /*AMDKCL_LIST_H*/ |