klist: implement klist_prev()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 27 Jul 2015 15:03:59 +0000 (18:03 +0300)
committerLee Jones <lee.jones@linaro.org>
Tue, 28 Jul 2015 07:50:42 +0000 (08:50 +0100)
commit2e0fed7f7cdc41679e209c5636ad7537dc6210a9
treeb6b445d658a1c4f2d2e95f8afcb9402f5807216c
parentddef08dd00f5548f943422c86e4ffe67dd040b6c
klist: implement klist_prev()

klist_prev() gets the previous element in the list. It is useful to traverse
through the list in reverse order, for example, to provide LIFO (last in first
out) variant of access.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
include/linux/klist.h
lib/klist.c