summaryrefslogtreecommitdiff
path: root/system/avermedia-a867/2.6.39.patch
diff options
context:
space:
mode:
authorRoberto Neri <rneri@libero.it>2011-09-09 16:24:27 -0400
committerNiels Horn <niels.horn@slackbuilds.org>2011-09-21 19:48:32 -0300
commiteb7cd0a2fbb41dff9476d0ce8b2a36783c2930b0 (patch)
tree817c5ba936f4d1965459f33137af1b419362868d /system/avermedia-a867/2.6.39.patch
parentea86c13700381239f82666684ab953c141c9f0bb (diff)
downloadslackbuilds-eb7cd0a2fbb41dff9476d0ce8b2a36783c2930b0.tar.gz
system/avermedia-a867: Added (AVerMedia A867 DVB-T kernel module)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'system/avermedia-a867/2.6.39.patch')
-rw-r--r--system/avermedia-a867/2.6.39.patch97
1 files changed, 97 insertions, 0 deletions
diff --git a/system/avermedia-a867/2.6.39.patch b/system/avermedia-a867/2.6.39.patch
new file mode 100644
index 0000000000..2f8860313c
--- /dev/null
+++ b/system/avermedia-a867/2.6.39.patch
@@ -0,0 +1,97 @@
+From 01dbc609534dc68b8890267b95c8a1efcd17437d Mon Sep 17 00:00:00 2001
+From: FLN <bp@9y.com>
+Date: Mon, 23 May 2011 01:02:20 +0200
+Subject: [PATCH] use mutex instead of BKL if kernel version is greater than
+ 2.6.38
+
+the BKL got removed with kernel version 2.6.39
+and therefore we have to use a proper locking mechanism
+---
+ af903x-fe.c | 12 +++++++++---
+ af903x.h | 6 +++++-
+ usb2impl.c | 1 -
+ 3 files changed, 14 insertions(+), 5 deletions(-)
+
+diff --git a/af903x-fe.c b/af903x-fe.c
+index 6f36a68..a1d1077 100644
+--- a/af903x-fe.c
++++ b/af903x-fe.c
+@@ -1,5 +1,4 @@
+ #include <linux/sched.h>
+-#include <linux/smp_lock.h>
+ #include <linux/list.h>
+ #include <linux/module.h>
+ #include <linux/version.h>
+@@ -11,7 +10,7 @@
+ #define A333_FREQ_MIN 44250000
+ #define A333_FREQ_MAX 867250000
+
+-
++DEFINE_MUTEX(mutex);
+
+ static int alwayslock; // default to 0
+ module_param(alwayslock, int, 0644);
+@@ -678,7 +677,11 @@ static int af903x_monitor_thread_func(void *data)
+ deb_data("- Enter %s Function -\n",__FUNCTION__);
+ if( !state ) return -1;
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)
+ lock_kernel();
++#else
++ mutex_lock(&mutex);
++#endif
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,61)
+ daemonize();
+ sigfillset(&current->blocked);
+@@ -689,8 +692,11 @@ static int af903x_monitor_thread_func(void *data)
+ #endif
+ siginitsetinv(&current->blocked, sigmask(SIGKILL)|sigmask(SIGINT)|\
+ sigmask(SIGTERM));
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)
+ unlock_kernel();
+-
++#else
++ mutex_unlock(&mutex);
++#endif
+ while(!state->thread_should_stop && !signal_pending(current)) {
+
+ DWORD dwError;
+diff --git a/af903x.h b/af903x.h
+index 203ff51..b2b35e3 100644
+--- a/af903x.h
++++ b/af903x.h
+@@ -9,7 +9,12 @@
+ #include <linux/slab.h>
+ #include <linux/module.h>
+ #include <linux/kref.h>
++#include <linux/version.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)
+ #include <linux/smp_lock.h>
++#else
++#include <linux/mutex.h>
++#endif
+ #include <linux/usb.h>
+ #include <asm/uaccess.h>
+ #include <dvb-usb.h>
+@@ -19,7 +24,6 @@
+ #include "firmware.h"
+ #include "type.h"
+ #include "Common.h"
+-#include <linux/version.h>
+ #include "debug.h"
+
+ #define ENABLE_TEST_FUNCTION 0
+diff --git a/usb2impl.c b/usb2impl.c
+index a3a30f9..3cf8b64 100644
+--- a/usb2impl.c
++++ b/usb2impl.c
+@@ -10,7 +10,6 @@
+ #include <linux/slab.h>
+ #include <linux/module.h>
+ #include <linux/kref.h>
+-#include <linux/smp_lock.h>
+ #include <linux/usb.h>
+ #include <asm/uaccess.h>
+ #include <linux/device.h>
+--
+1.7.5.2