diff --git a/scst/include/scst.h b/scst/include/scst.h index d01a6dec6..fadc8bbe3 100644 --- a/scst/include/scst.h +++ b/scst/include/scst.h @@ -3039,7 +3039,11 @@ static inline bool scst_cmd_atomic(struct scst_cmd *cmd) */ if (unlikely((in_atomic() || in_interrupt() || irqs_disabled()) && !res)) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28) + printk(KERN_ERR "ERROR: atomic context and non-atomic cmd!\n"); +#else pr_err("ERROR: atomic context and non-atomic cmd!\n"); +#endif dump_stack(); cmd->atomic = 1; res = 1; diff --git a/scst/include/scst_debug.h b/scst/include/scst_debug.h index 9f3d02ccb..cc452694c 100644 --- a/scst/include/scst_debug.h +++ b/scst/include/scst_debug.h @@ -39,7 +39,7 @@ * 311d0761 - Introduction of pr_cont() in . * 968ab183 - Moved pr_info() etc. from to */ -#ifndef pr_info +#ifndef pr_emerg #ifndef pr_fmt #define pr_fmt(fmt) fmt #endif @@ -57,6 +57,8 @@ #define pr_warn pr_warning #define pr_notice(fmt, ...) \ printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) +#endif +#ifndef pr_info #define pr_info(fmt, ...) \ printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) #endif diff --git a/scst/src/scst_pres.h b/scst/src/scst_pres.h index d7df016b8..36d4a0303 100644 --- a/scst/src/scst_pres.h +++ b/scst/src/scst_pres.h @@ -20,6 +20,11 @@ #define SCST_PRES_H_ #include +#ifdef INSIDE_KERNEL_TREE +#include +#else +#include "scst_debug.h" +#endif #define PR_REGISTER 0x00 #define PR_RESERVE 0x01