From 125da55d0c786c3a7d784a58b7e8d39d166edfd9 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Tue, 16 Jan 2001 18:59:47 +0000 Subject: [PATCH] fix RTAI spin_lock defs --- include/linux/comedi_rt.h | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/include/linux/comedi_rt.h b/include/linux/comedi_rt.h index fc0b9a82..12f0c932 100644 --- a/include/linux/comedi_rt.h +++ b/include/linux/comedi_rt.h @@ -71,20 +71,27 @@ void comedi_rt_pend_wakeup(wait_queue_head_t *q); // define a spin_lock_irqsave function that will work with rt or without #if defined(CONFIG_COMEDI_RTAI) -#define comedi_spin_lock_irqsave(x, flags) rt_spin_lock_irqsave(x, flags) -#define comedi_spin_unlock_irqrestore(x, flags) rt_spin_unlock_irqrestore(x, flags) +#define comedi_spin_lock_irqsave(x, flags) \ + (flags = rt_spin_lock_irqsave(x)) +#define comedi_spin_unlock_irqrestore(x, flags) \ + rt_spin_unlock_irqrestore(flags, x) #elif defined(CONFIG_COMEDI_RTL) -#define comedi_spin_lock_irqsave(x, flags) rtl_spin_lock_irqsave(x, flags) -#define comedi_spin_unlock_irqrestore(x, flags) rtl_spin_unlock_irqrestore(x, flags) +#define comedi_spin_lock_irqsave(x, flags) \ + rtl_spin_lock_irqsave(x, flags) +#define comedi_spin_unlock_irqrestore(x, flags) \ + rtl_spin_unlock_irqrestore(x, flags) #elif defined(CONFIG_COMEDI_RTL_V1) -#define comedi_spin_lock_irqsave(x, flags) rtl_spin_lock_irqsave(x, flags) -#define comedi_spin_unlock_irqrestore(x, flags) rtl_spin_unlock_irqrestore(x, flags) +#define comedi_spin_lock_irqsave(x, flags) \ + rtl_spin_lock_irqsave(x, flags) +#define comedi_spin_unlock_irqrestore(x, flags) \ + rtl_spin_unlock_irqrestore(x, flags) #else -#define comedi_spin_lock_irqsave(x, flags) spin_lock_irqsave(x, flags); -#define comedi_spin_unlock_irqrestore(x, flags) spin_unlock_irqrestore(x, flags); +// These are defined in comedidev.h +//#define comedi_spin_lock_irqsave(x, flags) spin_lock_irqsave(x, flags) +//#define comedi_spin_unlock_irqrestore(x, flags) spin_unlock_irqrestore(x, flags) #endif -- 2.26.2