Include the list_is_first() kernel function, which will be used by the Renesas USBF driver.
Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Herve Codina <[email protected]> Signed-off-by: Romain Gantois <[email protected]> --- include/linux/list.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/linux/list.h b/include/linux/list.h index 3dc38279716..dc788b1cb69 100644 --- a/include/linux/list.h +++ b/include/linux/list.h @@ -153,6 +153,16 @@ static inline void list_move_tail(struct list_head *list, list_add_tail(list, head); } +/** + * list_is_first -- tests whether @list is the first entry in list @head + * @list: the entry to test + * @head: the head of the list + */ +static inline int list_is_first(const struct list_head *list, const struct list_head *head) +{ + return list->prev == head; +} + /** * list_is_last - tests whether @list is the last entry in list @head * @list: the entry to test -- 2.54.0

