summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Schwarzott <zzam@gentoo.org>2007-04-26 16:45:58 +0000
committerMatthias Schwarzott <zzam@gentoo.org>2007-04-26 16:45:58 +0000
commit6f057b948a9f54f24b03b24565eb3281f218794b (patch)
tree5b8c95a60b8c3c06a83f2f7019948ddaa2f500a9 /media-tv/wis-go7007
parentamd64 stable (diff)
downloadgentoo-2-6f057b948a9f54f24b03b24565eb3281f218794b.tar.gz
gentoo-2-6f057b948a9f54f24b03b24565eb3281f218794b.tar.bz2
gentoo-2-6f057b948a9f54f24b03b24565eb3281f218794b.zip
Make it compile with kernel greater than 2.6.16, solving Bug #157021, thanks to Brian Long <vrtladept@gmail.com> and Greg Smolyn <smolyn@gmail.com> for the patch.
(Portage version: 2.1.2.4)
Diffstat (limited to 'media-tv/wis-go7007')
-rw-r--r--media-tv/wis-go7007/ChangeLog8
-rw-r--r--media-tv/wis-go7007/files/wis-go7007-0.9.8-kernel-2.6.17.diff200
-rw-r--r--media-tv/wis-go7007/wis-go7007-0.9.8-r1.ebuild15
3 files changed, 216 insertions, 7 deletions
diff --git a/media-tv/wis-go7007/ChangeLog b/media-tv/wis-go7007/ChangeLog
index cca814927770..0ebf1da69f0c 100644
--- a/media-tv/wis-go7007/ChangeLog
+++ b/media-tv/wis-go7007/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for media-tv/wis-go7007
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-tv/wis-go7007/ChangeLog,v 1.2 2007/04/26 08:46:06 zzam Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-tv/wis-go7007/ChangeLog,v 1.3 2007/04/26 16:45:58 zzam Exp $
+
+ 26 Apr 2007; Matthias Schwarzott <zzam@gentoo.org>
+ +files/wis-go7007-0.9.8-kernel-2.6.17.diff, wis-go7007-0.9.8-r1.ebuild:
+ Make it compile with kernel greater than 2.6.16, solving Bug #157021, thanks
+ to Brian Long <vrtladept@gmail.com> and Greg Smolyn <smolyn@gmail.com> for
+ the patch.
*wis-go7007-0.9.8-r1 (26 Apr 2007)
diff --git a/media-tv/wis-go7007/files/wis-go7007-0.9.8-kernel-2.6.17.diff b/media-tv/wis-go7007/files/wis-go7007-0.9.8-kernel-2.6.17.diff
new file mode 100644
index 000000000000..720f4c0650b2
--- /dev/null
+++ b/media-tv/wis-go7007/files/wis-go7007-0.9.8-kernel-2.6.17.diff
@@ -0,0 +1,200 @@
+diff -ru wis-go7007-linux-0.9.8-orig/kernel/go7007-driver.c wis-go7007-linux-0.9.8/kernel/go7007-driver.c
+--- wis-go7007-linux-0.9.8-orig/kernel/go7007-driver.c 2007-04-26 18:34:44.000000000 +0200
++++ wis-go7007-linux-0.9.8/kernel/go7007-driver.c 2007-04-26 18:35:06.000000000 +0200
+@@ -18,7 +18,9 @@
+ #include <linux/module.h>
+ #include <linux/version.h>
+ #include <linux/init.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17)
+ #include <linux/config.h>
++#endif
+ #include <linux/delay.h>
+ #include <linux/sched.h>
+ #include <linux/spinlock.h>
+diff -ru wis-go7007-linux-0.9.8-orig/kernel/go7007-fw.c wis-go7007-linux-0.9.8/kernel/go7007-fw.c
+--- wis-go7007-linux-0.9.8-orig/kernel/go7007-fw.c 2007-04-26 18:34:44.000000000 +0200
++++ wis-go7007-linux-0.9.8/kernel/go7007-fw.c 2007-04-26 18:35:06.000000000 +0200
+@@ -26,7 +26,10 @@
+
+ #include <linux/module.h>
+ #include <linux/init.h>
++#include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17)
+ #include <linux/config.h>
++#endif
+ #include <linux/time.h>
+ #include <linux/mm.h>
+ #include <linux/device.h>
+diff -ru wis-go7007-linux-0.9.8-orig/kernel/go7007-i2c.c wis-go7007-linux-0.9.8/kernel/go7007-i2c.c
+--- wis-go7007-linux-0.9.8-orig/kernel/go7007-i2c.c 2007-04-26 18:34:44.000000000 +0200
++++ wis-go7007-linux-0.9.8/kernel/go7007-i2c.c 2007-04-26 18:35:06.000000000 +0200
+@@ -15,9 +15,11 @@
+ * Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
+ */
+
++#include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17)
+ #include <linux/config.h>
++#endif
+ #include <linux/module.h>
+-#include <linux/version.h>
+ #include <linux/init.h>
+ #include <linux/delay.h>
+ #include <linux/sched.h>
+diff -ru wis-go7007-linux-0.9.8-orig/kernel/go7007-usb.c wis-go7007-linux-0.9.8/kernel/go7007-usb.c
+--- wis-go7007-linux-0.9.8-orig/kernel/go7007-usb.c 2007-04-26 18:34:44.000000000 +0200
++++ wis-go7007-linux-0.9.8/kernel/go7007-usb.c 2007-04-26 18:35:06.000000000 +0200
+@@ -27,7 +27,7 @@
+ #include <linux/usb.h>
+ #include <linux/i2c.h>
+ #include <asm/byteorder.h>
+-#include <media/audiochip.h>
++#include <media/tvaudio.h>
+
+ #include "go7007-priv.h"
+ #include "wis-i2c.h"
+@@ -225,17 +225,17 @@
+ .inputs = {
+ {
+ .video_input = 1,
+- .audio_input = AUDIO_EXTERN,
++ .audio_input = TVAUDIO_INPUT_EXTERN,
+ .name = "Composite",
+ },
+ {
+ .video_input = 8,
+- .audio_input = AUDIO_EXTERN,
++ .audio_input = TVAUDIO_INPUT_EXTERN,
+ .name = "S-Video",
+ },
+ {
+ .video_input = 3,
+- .audio_input = AUDIO_TUNER,
++ .audio_input = TVAUDIO_INPUT_TUNER,
+ .name = "Tuner",
+ },
+ },
+diff -ru wis-go7007-linux-0.9.8-orig/kernel/go7007-v4l2.c wis-go7007-linux-0.9.8/kernel/go7007-v4l2.c
+--- wis-go7007-linux-0.9.8-orig/kernel/go7007-v4l2.c 2007-04-26 18:34:44.000000000 +0200
++++ wis-go7007-linux-0.9.8/kernel/go7007-v4l2.c 2007-04-26 18:35:06.000000000 +0200
+@@ -17,8 +17,10 @@
+
+ #include <linux/module.h>
+ #include <linux/init.h>
+-#include <linux/config.h>
+ #include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17)
++#include <linux/config.h>
++#endif
+ #include <linux/delay.h>
+ #include <linux/sched.h>
+ #include <linux/spinlock.h>
+@@ -939,7 +941,7 @@
+ if (go->i2c_adapter_online) {
+ i2c_clients_command(&go->i2c_adapter, DECODER_SET_INPUT,
+ &go->board_info->inputs[*input].video_input);
+- i2c_clients_command(&go->i2c_adapter, AUDC_SET_INPUT,
++ i2c_clients_command(&go->i2c_adapter, VIDIOC_S_AUDIO,
+ &go->board_info->inputs[*input].audio_input);
+ }
+ return 0;
+diff -ru wis-go7007-linux-0.9.8-orig/kernel/snd-go7007.c wis-go7007-linux-0.9.8/kernel/snd-go7007.c
+--- wis-go7007-linux-0.9.8-orig/kernel/snd-go7007.c 2007-04-26 18:34:44.000000000 +0200
++++ wis-go7007-linux-0.9.8/kernel/snd-go7007.c 2007-04-26 18:38:24.000000000 +0200
+@@ -20,7 +20,9 @@
+ #include <linux/version.h>
+ #include <linux/moduleparam.h>
+ #include <linux/init.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17)
+ #include <linux/config.h>
++#endif
+ #include <linux/delay.h>
+ #include <linux/sched.h>
+ #include <linux/vmalloc.h>
+@@ -305,7 +307,11 @@
+ struct go7007_snd *gosnd = go->snd_context;
+
+ snd_card_disconnect(gosnd->card);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+ snd_card_free_in_thread(gosnd->card);
++#else
++ snd_card_free_when_closed(gosnd->card);
++#endif
+ return 0;
+ }
+ EXPORT_SYMBOL(go7007_snd_remove);
+diff -ru wis-go7007-linux-0.9.8-orig/kernel/wis-saa7113.c wis-go7007-linux-0.9.8/kernel/wis-saa7113.c
+--- wis-go7007-linux-0.9.8-orig/kernel/wis-saa7113.c 2007-04-26 18:34:44.000000000 +0200
++++ wis-go7007-linux-0.9.8/kernel/wis-saa7113.c 2007-04-26 18:35:06.000000000 +0200
+@@ -21,6 +21,7 @@
+ #include <linux/i2c.h>
+ #include <linux/videodev.h>
+ #include <linux/video_decoder.h>
++#include <linux/ioctl.h>
+
+ #include "wis-i2c.h"
+
+diff -ru wis-go7007-linux-0.9.8-orig/kernel/wis-saa7115.c wis-go7007-linux-0.9.8/kernel/wis-saa7115.c
+--- wis-go7007-linux-0.9.8-orig/kernel/wis-saa7115.c 2007-04-26 18:34:44.000000000 +0200
++++ wis-go7007-linux-0.9.8/kernel/wis-saa7115.c 2007-04-26 18:35:06.000000000 +0200
+@@ -21,6 +21,7 @@
+ #include <linux/i2c.h>
+ #include <linux/videodev.h>
+ #include <linux/video_decoder.h>
++#include <linux/ioctl.h>
+
+ #include "wis-i2c.h"
+
+diff -ru wis-go7007-linux-0.9.8-orig/kernel/wis-tw2804.c wis-go7007-linux-0.9.8/kernel/wis-tw2804.c
+--- wis-go7007-linux-0.9.8-orig/kernel/wis-tw2804.c 2007-04-26 18:34:44.000000000 +0200
++++ wis-go7007-linux-0.9.8/kernel/wis-tw2804.c 2007-04-26 18:35:06.000000000 +0200
+@@ -21,6 +21,7 @@
+ #include <linux/i2c.h>
+ #include <linux/videodev.h>
+ #include <linux/video_decoder.h>
++#include <linux/ioctl.h>
+
+ #include "wis-i2c.h"
+
+diff -ru wis-go7007-linux-0.9.8-orig/kernel/wis-tw9903.c wis-go7007-linux-0.9.8/kernel/wis-tw9903.c
+--- wis-go7007-linux-0.9.8-orig/kernel/wis-tw9903.c 2007-04-26 18:34:44.000000000 +0200
++++ wis-go7007-linux-0.9.8/kernel/wis-tw9903.c 2007-04-26 18:35:06.000000000 +0200
+@@ -21,6 +21,7 @@
+ #include <linux/i2c.h>
+ #include <linux/videodev.h>
+ #include <linux/video_decoder.h>
++#include <linux/ioctl.h>
+
+ #include "wis-i2c.h"
+
+diff -ru wis-go7007-linux-0.9.8-orig/kernel/wis-uda1342.c wis-go7007-linux-0.9.8/kernel/wis-uda1342.c
+--- wis-go7007-linux-0.9.8-orig/kernel/wis-uda1342.c 2007-04-26 18:34:44.000000000 +0200
++++ wis-go7007-linux-0.9.8/kernel/wis-uda1342.c 2007-04-26 18:35:06.000000000 +0200
+@@ -20,7 +20,7 @@
+ #include <linux/version.h>
+ #include <linux/i2c.h>
+ #include <linux/videodev.h>
+-#include <media/audiochip.h>
++#include <media/tvaudio.h>
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+ #include <media/v4l2-common.h>
+ #endif
+@@ -38,15 +38,15 @@
+ unsigned int cmd, void *arg)
+ {
+ switch (cmd) {
+- case AUDC_SET_INPUT:
++ case VIDIOC_S_AUDIO:
+ {
+ int *inp = arg;
+
+ switch (*inp) {
+- case AUDIO_TUNER:
++ case TVAUDIO_INPUT_TUNER:
+ write_reg(client, 0x00, 0x1441); /* select input 2 */
+ break;
+- case AUDIO_EXTERN:
++ case TVAUDIO_INPUT_EXTERN:
+ write_reg(client, 0x00, 0x1241); /* select input 1 */
+ break;
+ default:
diff --git a/media-tv/wis-go7007/wis-go7007-0.9.8-r1.ebuild b/media-tv/wis-go7007/wis-go7007-0.9.8-r1.ebuild
index e3088700de72..df6dc8e260d9 100644
--- a/media-tv/wis-go7007/wis-go7007-0.9.8-r1.ebuild
+++ b/media-tv/wis-go7007/wis-go7007-0.9.8-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-tv/wis-go7007/wis-go7007-0.9.8-r1.ebuild,v 1.1 2007/04/26 08:46:06 zzam Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-tv/wis-go7007/wis-go7007-0.9.8-r1.ebuild,v 1.2 2007/04/26 16:45:58 zzam Exp $
inherit eutils linux-mod
@@ -20,7 +20,7 @@ S=${WORKDIR}/${MY_PN}-${PV}
pkg_setup() {
BUILD_TARGETS="all"
- BUILD_PARAMS="KDIR=${KERNEL_DIR}"
+ BUILD_PARAMS="KERNELSRC=${KERNEL_DIR}"
CONFIG_CHECK="HOTPLUG MODULES KMOD FW_LOADER I2C VIDEO_DEV SOUND SND USB
USB_DEVICEFS USB_EHCI_HCD"
@@ -28,10 +28,10 @@ pkg_setup() {
CONFIG_CHECK="${CONFIG_CHECK} SND_MIXER_OSS SND_PCM_OSS"
fi
- if ! kernel_is 2 6 16; then
- eerror "These drivers will only work with a 2.6.16 kernel"
- die "Needs a different kernel"
- fi
+ #if ! kernel_is 2 6 16; then
+ # eerror "These drivers will only work with a 2.6.16 kernel"
+ # #die "Needs a different kernel"
+ #fi
linux-mod_pkg_setup
MODULE_NAMES="go7007(extra:${S}:${S}/kernel)
@@ -49,6 +49,9 @@ src_unpack() {
unpack ${A}
cd ${S}
epatch "${FILESDIR}/${P}-fix-udev.diff"
+ if kernel_is ge 2 6 17; then
+ epatch "${FILESDIR}/${P}-kernel-2.6.17.diff"
+ fi
}
src_compile() {