scst: Add a pr_warn_once() backport

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8053 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2019-03-14 01:48:24 +00:00
parent c87e440fab
commit 4c09bc9db7

View File

@@ -789,6 +789,15 @@ static inline long get_user_pages_backport(unsigned long start,
})
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 38)
/*
* See also commit 16cb839f1332 ("include/linux/printk.h: add pr_<level>_once
* macros") # v2.6.38.
*/
#define pr_warn_once(fmt, ...) \
printk_once(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
/*
* See also patch "kernel.h: add pr_warn for symmetry to dev_warn,