summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/sound/oss/aci.c9
-rw-r--r--linux/sound/oss/btaudio.c10
-rw-r--r--v4l/Makefile8
-rwxr-xr-xv4l/scripts/make_kconfig.pl3
4 files changed, 25 insertions, 5 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;
diff --git a/v4l/Makefile b/v4l/Makefile
index 963146eaa..f9af44703 100644
--- a/v4l/Makefile
+++ b/v4l/Makefile
@@ -30,7 +30,7 @@ endif
#################################################
# default compilation rule
-default:: config-compat.h Makefile.media links .version
+default:: config-compat.h Makefile.media links .version oss
@if [ "x$(SRCDIR)" != x ]; then echo SRCDIR is $(SRCDIR) ; fi
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) $(MYCFLAGS) modules
./scripts/rmmod.pl check
@@ -229,6 +229,10 @@ links::
@find ../linux/drivers/media -name '*.[ch]' -type f -exec ln -sf '{}' . \;
@find ../linux/sound -name '*.[ch]' -type f -exec ln -sf '{}' . \;
+# This link is so code with #include "oss/*.h" will find its header files
+oss:
+ ln -sf . oss
+
config-compat.h:: .myconfig
@perl \
-e 'print "#ifndef __CONFIG_COMPAT_H__\n";' \
@@ -267,7 +271,7 @@ distclean:: clean
Kconfig Kconfig.kern .config .config.cmd .myconfig \
.kconfig.dep
-rm -rf .tmp_versions
- -rm -f scripts/lxdialog scripts/kconfig
+ -rm -f scripts/lxdialog scripts/kconfig oss
@find .. -name '*.orig' -exec rm '{}' \;
@find .. -name '*.rej' -exec rm '{}' \;
diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl
index 6f1b108c1..c1a60e5a9 100755
--- a/v4l/scripts/make_kconfig.pl
+++ b/v4l/scripts/make_kconfig.pl
@@ -211,7 +211,7 @@ sub checkdeps()
# Convert a Kconfig expression to a Perl expression
sub toperl($)
{
- $_ = shift;
+ local $_ = shift;
# Turn n,m,y into 0,1,2
s/\bn\b/0/g; s/\bm\b/1/g; s/\by\b/2/g;
@@ -430,7 +430,6 @@ open OUT, ">Kconfig" or die "Cannot write Kconfig file";
print OUT <<"EOF";
mainmenu "V4L/DVB menu"
source Kconfig.kern
-source Kconfig.sound
config VIDEO_KERNEL_VERSION
bool "Enable drivers not supported by this kernel"
default n