diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2006-09-01 14:42:30 -0700 |
---|---|---|
committer | Trent Piepho <xyzzy@speakeasy.org> | 2006-09-01 14:42:30 -0700 |
commit | c2e9b3f5319099348a3dae4e963f9f31d648b3c8 (patch) | |
tree | deaca5d80cd08e16f0408388765e4b09a37e4a7d /linux/sound/oss | |
parent | a53d4f242ffff64bfe530ff64cda6808fe4690f6 (diff) | |
download | mediapointer-dvb-s2-c2e9b3f5319099348a3dae4e963f9f31d648b3c8.tar.gz mediapointer-dvb-s2-c2e9b3f5319099348a3dae4e963f9f31d648b3c8.tar.bz2 |
Add compat code to aci and btaudio so they compile
From: Trent Piepho <xyzzy@speakeasy.org>
aci.c was missing compat.h, and both needed the mutex compat code for
kernels < 2.6.16.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Diffstat (limited to 'linux/sound/oss')
-rw-r--r-- | linux/sound/oss/aci.c | 9 | ||||
-rw-r--r-- | linux/sound/oss/btaudio.c | 10 |
2 files changed, 18 insertions, 1 deletions
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 <linux/kernel.h> #include <linux/init.h> #include <linux/module.h> #include <linux/proc_fs.h> #include <linux/slab.h> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16) #include <linux/mutex.h> +#else +#include <asm/semaphore.h> +#endif #include <asm/io.h> #include <asm/uaccess.h> @@ -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 <linux/module.h> #include <linux/errno.h> #include <linux/pci.h> @@ -32,8 +33,11 @@ #include <linux/soundcard.h> #include <linux/slab.h> #include <linux/kdev_t.h> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16) #include <linux/mutex.h> -#include "compat.h" +#else +#include <asm/semaphore.h> +#endif #include <asm/uaccess.h> #include <asm/io.h> @@ -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; |