Commit 93047af2 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

greybus: kernel_ver: add list_last_entry for old kernels

Add list_last_entry macro for kernels older than 3.13.
Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Reviewed-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 129a06f5
......@@ -235,4 +235,9 @@ static inline size_t sg_pcopy_from_buffer(struct scatterlist *sgl,
}
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
#define list_last_entry(ptr, type, member) \
list_entry((ptr)->prev, type, member)
#endif
#endif /* __GREYBUS_KERNEL_VER_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment