From c2e9b3f5319099348a3dae4e963f9f31d648b3c8 Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Fri, 1 Sep 2006 14:42:30 -0700 Subject: Add compat code to aci and btaudio so they compile From: Trent Piepho aci.c was missing compat.h, and both needed the mutex compat code for kernels < 2.6.16. Signed-off-by: Trent Piepho --- linux/sound/oss/aci.c | 9 +++++++++ linux/sound/oss/btaudio.c | 10 +++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) (limited to 'linux/sound/oss') diff --git a/linux/sound/oss/aci.c b/linux/sound/oss/aci.c index 97634d457..95405ff3c 100644 --- a/linux/sound/oss/aci.c +++ b/linux/sound/oss/aci.c @@ -51,12 +51,17 @@ * Get rid of check_region, .bss optimizations, use set_current_state */ +#include "compat.h" #include #include #include #include #include +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16) #include +#else +#include +#endif #include #include @@ -80,7 +85,11 @@ static int aci_micpreamp=3; /* microphone preamp-level that can't be * * checked with ACI versions prior to 0xb0 */ static int mixer_device; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16) static struct mutex aci_mutex; +#else +static struct semaphore aci_mutex; +#endif #ifdef MODULE static int reset; diff --git a/linux/sound/oss/btaudio.c b/linux/sound/oss/btaudio.c index 4813cee1d..1a0e427ce 100644 --- a/linux/sound/oss/btaudio.c +++ b/linux/sound/oss/btaudio.c @@ -19,6 +19,7 @@ */ +#include "compat.h" #include #include #include @@ -32,8 +33,11 @@ #include #include #include +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16) #include -#include "compat.h" +#else +#include +#endif #include #include @@ -111,7 +115,11 @@ struct btaudio { /* locking */ int users; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16) struct mutex lock; +#else + struct semaphore lock; +#endif /* risc instructions */ unsigned int risc_size; -- cgit v1.2.3