Merge remote-tracking branch 'origin/develop-3.10' into develop-3.10-next
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / arm / midgard / mali_kbase_utility.c
1 /*
2  *
3  * (C) COPYRIGHT ARM Limited. All rights reserved.
4  *
5  * This program is free software and is provided to you under the terms of the
6  * GNU General Public License version 2 as published by the Free Software
7  * Foundation, and any use by you of this program is subject to the terms
8  * of such GNU licence.
9  *
10  * A copy of the licence is included with the program, and can also be obtained
11  * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
12  * Boston, MA  02110-1301, USA.
13  *
14  */
15
16
17
18
19
20 #include <mali_kbase.h>
21
22 mali_bool kbasep_list_member_of(const struct list_head *base, struct list_head *entry)
23 {
24         struct list_head *pos = base->next;
25         while (pos != base) {
26                 if (pos == entry)
27                         return MALI_TRUE;
28
29                 pos = pos->next;
30         }
31         return MALI_FALSE;
32 }