[SM-Commit] GIT changes to master grimoire by Elisamuel Resto (43d5067b1c70409ffdb408635ee6ddfc39aef1bd)

Elisamuel Resto scm at sourcemage.org
Thu Jun 26 05:25:59 EDT 2008


GIT changes to master grimoire by Elisamuel Resto <ryuji at sourcemage.org>:

 kernels/qc-usb/HISTORY                           |    7 ++++
 kernels/qc-usb/PRE_BUILD                         |    6 +++
 kernels/qc-usb/qc-usb-0.6.6-kcompat-2.6.24.patch |   36 +++++++++++++++++++++++
 3 files changed, 49 insertions(+)

New commits:
commit 43d5067b1c70409ffdb408635ee6ddfc39aef1bd
Author: Elisamuel Resto <ryuji at sourcemage.org>
Commit: Elisamuel Resto <ryuji at sourcemage.org>

    kernels/qc-usb: qc-usb-0.6.6-kcompat-2.6.24.patch for kernels >= 2.6.24
    this patch is a saner (instead of removing blindly, it checks if
    older kernel to define/add the older variables) version taken from
    the Gentoo bugtracker: http://bugs.gentoo.org/show_bug.cgi?id=208568
    The original can be found at:
    http://article.gmane.org/gmane.linux.drivers.quickcam.devel/1396

diff --git a/kernels/qc-usb/HISTORY b/kernels/qc-usb/HISTORY
index 1b1ef34..36c4b1e 100644
--- a/kernels/qc-usb/HISTORY
+++ b/kernels/qc-usb/HISTORY
@@ -1,3 +1,10 @@
+2008-06-26 Elisamuel Resto <ryuji at sourcemage.org>
+	* PRE_BUILD, qc-usb-0.6.6-kcompat-2.6.24.patch: added
+	  this patch is a saner (instead of removing blindly, it checks if
+	  older kernel to define/add the older variables) version taken from
+	  the ArchLinux bugtracker. The original can be found at:
+	  http://article.gmane.org/gmane.linux.drivers.quickcam.devel/1396
+
 2006-12-14 Ladislav Hagara <hgr at vabo.cz>
 	* DETAILS: 0.6.6
 	* PRE_BUILD, qc-usb_gcc4.patch: removed
diff --git a/kernels/qc-usb/PRE_BUILD b/kernels/qc-usb/PRE_BUILD
new file mode 100755
index 0000000..249c872
--- /dev/null
+++ b/kernels/qc-usb/PRE_BUILD
@@ -0,0 +1,6 @@
+default_pre_build &&
+cd ${SOURCE_DIRECTORY} &&
+
+if [[ $(get_kernel_version | cut -d. -f1-3 | sed -e 's/\.//g') -ge 2624 ]]; then
+  patch -p1 -i ${SPELL_DIRECTORY}/qc-usb-${VERSION}-kcompat-2.6.24.patch || return 1
+fi
diff --git a/kernels/qc-usb/qc-usb-0.6.6-kcompat-2.6.24.patch b/kernels/qc-usb/qc-usb-0.6.6-kcompat-2.6.24.patch
new file mode 100644
index 0000000..c8974bc
--- /dev/null
+++ b/kernels/qc-usb/qc-usb-0.6.6-kcompat-2.6.24.patch
@@ -0,0 +1,36 @@
+diff -urNad qc-usb-0.6.6~/qc-driver.c qc-usb-0.6.6/qc-driver.c
+--- qc-usb-0.6.6~/qc-driver.c	2006-10-24 04:06:19.000000000 +0200
++++ qc-usb-0.6.6/qc-driver.c	2007-12-09 17:20:30.000000000 +0100
+@@ -821,7 +821,9 @@
+ 	if (!cr) goto fail2;
+ 	urb->transfer_buffer = kmalloc(qc_i2c_maxbufsize*sizeof(u8), GFP_KERNEL);	/* Allocate maximum ever needed */
+ 	if (!urb->transfer_buffer) goto fail3;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
+ 	spin_lock_init(&urb->lock);
++#endif
+ 	urb->complete = qc_i2c_handler;
+ 	urb->context  = qc;
+ #if (LINUX_VERSION_CODE<KERNEL_VERSION(2,6,9) && !defined(CONFIG_SUSE_KERNEL)) || LINUX_VERSION_CODE<KERNEL_VERSION(2,6,8)
+@@ -3006,7 +3008,9 @@
+ static struct video_device qc_v4l_template = {
+ 	name:		"QuickCam USB",
+ 	type:		VID_TYPE_CAPTURE | VID_TYPE_SUBCAPTURE,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
+ 	hardware:	VID_HARDWARE_QCAM_USB,
++#endif
+ 	minor:		-1,
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+ 	release:	qc_v4l_release,
+diff -urNad qc-usb-0.6.6~/quickcam.h qc-usb-0.6.6/quickcam.h
+--- qc-usb-0.6.6~/quickcam.h	2006-11-04 14:38:27.000000000 +0100
++++ qc-usb-0.6.6/quickcam.h	2007-12-09 17:17:01.000000000 +0100
+@@ -126,7 +126,9 @@
+ #define FALSE			0
+ #define TRUE			(!FALSE)
+ typedef unsigned char Bool;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
+ #define BIT(x)		(1<<(x))
++#endif
+ #define SIZE(a)		(sizeof(a)/sizeof((a)[0]))
+ #define MAX(a,b)	((a)>(b)?(a):(b))
+ #define MIN(a,b)	((a)<(b)?(a):(b))



More information about the SM-Commit mailing list