summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHartmut Hackmann <hartmut.hackmann@t-online.de>2007-02-15 01:23:08 +0100
committerHartmut Hackmann <hartmut.hackmann@t-online.de>2007-02-15 01:23:08 +0100
commit863e6bd467176febc73a46effb75f3969d87413d (patch)
treeccf744460e19cadac10ca60a22d502255185db80
parente13eaa7389cf068c8243c7d98d2ccd6321093817 (diff)
downloadmediapointer-dvb-s2-863e6bd467176febc73a46effb75f3969d87413d.tar.gz
mediapointer-dvb-s2-863e6bd467176febc73a46effb75f3969d87413d.tar.bz2
saa7134 2.6.20 compat patch
From: Markus Rechberger <markus.rechberger@amd.com> saa7134 2.6.20 compat patch Signed-off-by: Markus Rechberger <markus.rechberger@amd.com> Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-core.c18
-rw-r--r--linux/drivers/media/video/saa7134/saa7134.h2
2 files changed, 15 insertions, 5 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-core.c b/linux/drivers/media/video/saa7134/saa7134-core.c
index 194ad5a3f..ef1b8d7a1 100644
--- a/linux/drivers/media/video/saa7134/saa7134-core.c
+++ b/linux/drivers/media/video/saa7134/saa7134-core.c
@@ -257,10 +257,14 @@ static void request_submodules(struct saa7134_dev *dev){
request_module("saa7134-oss");
}
#else
-static struct work_struct request_module_wk;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
static void request_module_async(void *ptr){
- struct saa7134_dev *dev=(struct saa7134_dev*)ptr;
+ struct saa7134_dev* dev=(struct saa7134_dev*)ptr;
+#else
+static void request_module_async(struct work_struct *work){
+ struct saa7134_dev* dev = container_of(work, struct saa7134_dev, request_module_wk);
+#endif
if (card_is_empress(dev))
request_module("saa7134-empress");
if (card_is_dvb(dev))
@@ -273,13 +277,17 @@ static void request_module_async(void *ptr){
static void request_submodules(struct saa7134_dev *dev)
{
- INIT_WORK(&request_module_wk, request_module_async, dev);
- schedule_work(&request_module_wk);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
+ INIT_WORK(&dev->request_module_wk, request_module_async, (void*)dev);
+#else
+ INIT_WORK(&dev->request_module_wk, request_module_async);
+#endif
+ schedule_work(&dev->request_module_wk);
}
#endif
#else
-#define request_module_depend(name)
+#define request_submodules()
#endif /* CONFIG_MODULES */
/* ------------------------------------------------------------------ */
diff --git a/linux/drivers/media/video/saa7134/saa7134.h b/linux/drivers/media/video/saa7134/saa7134.h
index 9742d318b..5d89e21f8 100644
--- a/linux/drivers/media/video/saa7134/saa7134.h
+++ b/linux/drivers/media/video/saa7134/saa7134.h
@@ -464,6 +464,8 @@ struct saa7134_dev {
#ifdef VIDIOC_G_PRIORITY
struct v4l2_prio_state prio;
#endif
+ /* workstruct for loading modules */
+ struct work_struct request_module_wk;
/* insmod option/autodetected */
int autodetected;