summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Isely <devnull@localhost>2006-01-22 03:51:19 +0000
committerMike Isely <devnull@localhost>2006-01-22 03:51:19 +0000
commite9b2a80a0b77053b342d767697d029baf8438914 (patch)
treece5699bb53a098fadc2e87beacd67bb624a975de
parentf7dc519c44e0bf5144047d10be443c4ac73bf475 (diff)
downloadmediapointer-dvb-s2-e9b2a80a0b77053b342d767697d029baf8438914.tar.gz
mediapointer-dvb-s2-e9b2a80a0b77053b342d767697d029baf8438914.tar.bz2
Various fixes to permit pvrusb2 compilation w/ kernel 2.6.16
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
-rw-r--r--v4l/ChangeLog13
-rw-r--r--v4l_experimental/pvrusb2/pvrusb2-i2c-core.c10
-rw-r--r--v4l_experimental/pvrusb2/pvrusb2-main.c4
-rw-r--r--v4l_experimental/pvrusb2/pvrusb2-sysfs.c7
4 files changed, 31 insertions, 3 deletions
diff --git a/v4l/ChangeLog b/v4l/ChangeLog
index fc0c0c4de..06b771d6a 100644
--- a/v4l/ChangeLog
+++ b/v4l/ChangeLog
@@ -1,3 +1,16 @@
+2006-01-22 03:49 mcisely
+
+ * v4l_experimental/pvrusb2/pvrusb2-i2c-core.c:
+ (pvr2_i2c_core_singleton):
+ * v4l_experimental/pvrusb2/pvrusb2-main.c:
+ * v4l_experimental/pvrusb2/pvrusb2-sysfs.c:
+ (pvr2_sysfs_class_create):
+
+ - Various minor fixes to permit clean pvrusb2 compilation against
+ kernel version 2.6.16.
+
+ Signed-off-by: Mike Isely <isely@pobox.com>
+
2006-01-22 03:45 mcisely
* v4l_experimental/pvrusb2/pvrusb2-audio.c:
diff --git a/v4l_experimental/pvrusb2/pvrusb2-i2c-core.c b/v4l_experimental/pvrusb2/pvrusb2-i2c-core.c
index 869e40519..d7e9ffabb 100644
--- a/v4l_experimental/pvrusb2/pvrusb2-i2c-core.c
+++ b/v4l_experimental/pvrusb2/pvrusb2-i2c-core.c
@@ -1,6 +1,6 @@
/*
*
- * $Id: pvrusb2-i2c-core.c,v 1.3 2006/01/14 22:09:52 mcisely Exp $
+ * $Id: pvrusb2-i2c-core.c,v 1.4 2006/01/22 03:51:19 mcisely Exp $
*
* Copyright (C) 2005 Mike Isely <isely@pobox.com>
*
@@ -299,9 +299,17 @@ static int pvr2_i2c_core_singleton(struct i2c_client *cp,
if (!cp) return -EINVAL;
if (!(cp->driver)) return -EINVAL;
if (!(cp->driver->command)) return -EINVAL;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
if (!try_module_get(cp->driver->owner)) return -EAGAIN;
+#else
+ if (!try_module_get(cp->driver->driver.owner)) return -EAGAIN;
+#endif
stat = cp->driver->command(cp,cmd,arg);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
module_put(cp->driver->owner);
+#else
+ module_put(cp->driver->driver.owner);
+#endif
return stat;
}
diff --git a/v4l_experimental/pvrusb2/pvrusb2-main.c b/v4l_experimental/pvrusb2/pvrusb2-main.c
index 6e026a1c6..72b5132e6 100644
--- a/v4l_experimental/pvrusb2/pvrusb2-main.c
+++ b/v4l_experimental/pvrusb2/pvrusb2-main.c
@@ -1,6 +1,6 @@
/*
*
- * $Id: pvrusb2-main.c,v 1.6 2006/01/14 22:09:52 mcisely Exp $
+ * $Id: pvrusb2-main.c,v 1.7 2006/01/22 03:51:19 mcisely Exp $
*
* Copyright (C) 2005 Mike Isely <isely@pobox.com>
* Copyright (C) 2004 Aurelien Alleaume <slts@free.fr>
@@ -112,7 +112,9 @@ static void pvr_disconnect(struct usb_interface *intf)
}
static struct usb_driver pvr_driver = {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
owner: THIS_MODULE,
+#endif
name: "pvrusb2",
id_table: pvr_table,
probe: pvr_probe,
diff --git a/v4l_experimental/pvrusb2/pvrusb2-sysfs.c b/v4l_experimental/pvrusb2/pvrusb2-sysfs.c
index 42e012d96..7d17ee749 100644
--- a/v4l_experimental/pvrusb2/pvrusb2-sysfs.c
+++ b/v4l_experimental/pvrusb2/pvrusb2-sysfs.c
@@ -1,6 +1,6 @@
/*
*
- * $Id: pvrusb2-sysfs.c,v 1.1 2005/11/14 13:31:24 mchehab Exp $
+ * $Id: pvrusb2-sysfs.c,v 1.2 2006/01/22 03:51:19 mcisely Exp $
*
* Copyright (C) 2005 Mike Isely <isely@pobox.com>
*
@@ -22,6 +22,7 @@
#include <linux/string.h>
#include <linux/slab.h>
#include <asm/semaphore.h>
+#include "compat.h"
#include "pvrusb2-sysfs.h"
#include "pvrusb2-hdw.h"
#include "pvrusb2-debug.h"
@@ -739,7 +740,11 @@ struct pvr2_sysfs_class *pvr2_sysfs_class_create(void)
clp->class.name = "pvrusb2";
clp->class.class_release = pvr2_sysfs_class_release;
clp->class.release = pvr2_sysfs_release;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
clp->class.hotplug = pvr2_sysfs_hotplug;
+#else
+ clp->class.uevent = pvr2_sysfs_hotplug;
+#endif
if (class_register(&clp->class)) {
pvr2_sysfs_trace(
"Registration failed for pvr2_sysfs_class id=%p",clp);