Make it compile with kernel greater than 2.6.16, solving Bug #157021, thanks to Brian...
authorMatthias Schwarzott <zzam@gentoo.org>
Thu, 26 Apr 2007 16:45:58 +0000 (16:45 +0000)
committerMatthias Schwarzott <zzam@gentoo.org>
Thu, 26 Apr 2007 16:45:58 +0000 (16:45 +0000)
Package-Manager: portage-2.1.2.4

media-tv/wis-go7007/ChangeLog
media-tv/wis-go7007/Manifest
media-tv/wis-go7007/files/wis-go7007-0.9.8-kernel-2.6.17.diff [new file with mode: 0644]
media-tv/wis-go7007/wis-go7007-0.9.8-r1.ebuild

index cca814927770d59d75d4f74ab3b743065c1da94b..0ebf1da69f0c79f446e669b9d4be7f06d55f2aef 100644 (file)
@@ -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)
 
index 37529f6f87c3874d114cb747277b403642ecef31..bf9ee1ec8db7d7b84dfbe8150276cdf9b45f49c9 100644 (file)
@@ -5,19 +5,23 @@ AUX wis-go7007-0.9.8-fix-udev.diff 1459 RMD160 5cd0f53a49dae54160a209b2fd1172f1f
 MD5 8061c929ce66d2e825d7830363874b44 files/wis-go7007-0.9.8-fix-udev.diff 1459
 RMD160 5cd0f53a49dae54160a209b2fd1172f1f2293b30 files/wis-go7007-0.9.8-fix-udev.diff 1459
 SHA256 78c25a7d45c2ebdf0d4360f5a2619a32ad8ee13586c3dc8b58ce5ad4b223f949 files/wis-go7007-0.9.8-fix-udev.diff 1459
+AUX wis-go7007-0.9.8-kernel-2.6.17.diff 7039 RMD160 c8497f43dc2345959dc25dead0f08a486f7779f9 SHA1 351a1446f4e214de967d4ee1040c6205582c8564 SHA256 cf1785c4525d9764a5a022b6e61b54ac0ba03031bdcdbba15f853627d05b3f32
+MD5 00f016168f6ab868a9008d8c17ee3c22 files/wis-go7007-0.9.8-kernel-2.6.17.diff 7039
+RMD160 c8497f43dc2345959dc25dead0f08a486f7779f9 files/wis-go7007-0.9.8-kernel-2.6.17.diff 7039
+SHA256 cf1785c4525d9764a5a022b6e61b54ac0ba03031bdcdbba15f853627d05b3f32 files/wis-go7007-0.9.8-kernel-2.6.17.diff 7039
 DIST wis-go7007-linux-0.9.8.tar.bz2 136517 RMD160 d3336efeac890848851506d6079df10d2ffd34a4 SHA1 6732d890f964a086ea5c3116a921a9eafce40c26 SHA256 efd7600d881fc57e0484ddd7f0820c18a3bd98dce8060418dfba1626c8a79b1a
-EBUILD wis-go7007-0.9.8-r1.ebuild 2821 RMD160 149a7cc679faf0cd53a526bd929ee2d99e347a10 SHA1 8550f458a6c903b8a1e332dc09af8fb5749c2828 SHA256 8ed0f3939bac58869ccc6f63b13a337eadeabfbb5bfdd1c7bd5f0671ab32e15f
-MD5 5d749c800cc7762300e049564c33476e wis-go7007-0.9.8-r1.ebuild 2821
-RMD160 149a7cc679faf0cd53a526bd929ee2d99e347a10 wis-go7007-0.9.8-r1.ebuild 2821
-SHA256 8ed0f3939bac58869ccc6f63b13a337eadeabfbb5bfdd1c7bd5f0671ab32e15f wis-go7007-0.9.8-r1.ebuild 2821
+EBUILD wis-go7007-0.9.8-r1.ebuild 2912 RMD160 f25b93f5cf73c3d7e2ca353253263143ff2da1fb SHA1 52488a051b4dfca7279838fa8c40a754e02c9133 SHA256 361b2aaff7a63c20fc7e39dfc9658c52298d090f842ec05230fc3fe4ef1f4116
+MD5 72863743101329df4c30958eb1c60c3c wis-go7007-0.9.8-r1.ebuild 2912
+RMD160 f25b93f5cf73c3d7e2ca353253263143ff2da1fb wis-go7007-0.9.8-r1.ebuild 2912
+SHA256 361b2aaff7a63c20fc7e39dfc9658c52298d090f842ec05230fc3fe4ef1f4116 wis-go7007-0.9.8-r1.ebuild 2912
 EBUILD wis-go7007-0.9.8.ebuild 2740 RMD160 4f2af67daec9284ccd8c384c80efd239cd95003f SHA1 7a9fd57a3e01b46a2c67e3e13da564753a6217b0 SHA256 37e971a896f9b5947a74bcce3982be49681cc46b72600c52687022048d2937e0
 MD5 b89fa3abe686a8480d29108c883a4ad1 wis-go7007-0.9.8.ebuild 2740
 RMD160 4f2af67daec9284ccd8c384c80efd239cd95003f wis-go7007-0.9.8.ebuild 2740
 SHA256 37e971a896f9b5947a74bcce3982be49681cc46b72600c52687022048d2937e0 wis-go7007-0.9.8.ebuild 2740
-MISC ChangeLog 618 RMD160 3b856aae0d2a7b00d59b64dd6a58dfe2ddcd1e76 SHA1 1b15dd10c6f64dd81ea5ac8f0533690b0c1bde4a SHA256 c9a27f3b20200e9a049d69ada7ecf793db5d970ff94fbefc2a8ead835cff52d0
-MD5 53282ef2222845a58c4d13db9b0f301d ChangeLog 618
-RMD160 3b856aae0d2a7b00d59b64dd6a58dfe2ddcd1e76 ChangeLog 618
-SHA256 c9a27f3b20200e9a049d69ada7ecf793db5d970ff94fbefc2a8ead835cff52d0 ChangeLog 618
+MISC ChangeLog 915 RMD160 5b456c72abffef99e330c144bd60fcd18c97ee78 SHA1 09b2336ee25f275f1456d276e22db9b45a760c79 SHA256 a4cfda5cd1a4f220678213c1970821d32e656df8878df4ab3a87a458170a8e43
+MD5 d597ed46837934df7e82e7caf01494fb ChangeLog 915
+RMD160 5b456c72abffef99e330c144bd60fcd18c97ee78 ChangeLog 915
+SHA256 a4cfda5cd1a4f220678213c1970821d32e656df8878df4ab3a87a458170a8e43 ChangeLog 915
 MISC metadata.xml 246 RMD160 0f200b959fe440bc003682c4a1dd9ee1d3779fe3 SHA1 308bc54fe4d0cf8ef74b640816059455b7cd8922 SHA256 976fea96fe7879e5ed46a894977803c4927461d0763bf2a08cc17c25bdffa731
 MD5 864b7b7362c88dc173a6bfb88a4d0eb1 metadata.xml 246
 RMD160 0f200b959fe440bc003682c4a1dd9ee1d3779fe3 metadata.xml 246
@@ -31,7 +35,7 @@ SHA256 fc9dcae83131f6a710ae5f33325d1af4a7bb96444b71139f46b0b8065502a260 files/di
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.3 (GNU/Linux)
 
-iD8DBQFGMGbXt2vP6XvVdOcRAqxaAKCw9d1iDJgET9hdx3mmCC2O/mKoFQCg3e0o
-Aqlti4mxfx1H7gM6In9oDJU=
-=3RDt
+iD8DBQFGMNdMt2vP6XvVdOcRAt7GAKC/Isl2KG1ygqeEP7diP4c73tklOACeNInW
+jwoqvbSuJRJ6xCZnoqyGRKU=
+=155o
 -----END PGP SIGNATURE-----
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 (file)
index 0000000..720f4c0
--- /dev/null
@@ -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:
index e3088700de72cfeb77a83aa11d659f76c87ab168..df6dc8e260d9a572181e18003275bb9f9cc0f54b 100644 (file)
@@ -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() {