85 lines
3.1 KiB
Diff
85 lines
3.1 KiB
Diff
|
diff -Nru lirc-0.8.2.orig/drivers/lirc_gpio/bttv_deprecated.c lirc-0.8.2/drivers/lirc_gpio/bttv_deprecated.c
|
||
|
--- lirc-0.8.2.orig/drivers/lirc_gpio/bttv_deprecated.c 1970-01-01 01:00:00.000000000 +0100
|
||
|
+++ lirc-0.8.2/drivers/lirc_gpio/bttv_deprecated.c 2007-12-22 16:09:37.000000000 +0100
|
||
|
@@ -0,0 +1,44 @@
|
||
|
+//Temporarily added until a resolution is reached upstream
|
||
|
+//For kernel 2.6.22
|
||
|
+
|
||
|
+#include <linux/version.h>
|
||
|
+#if LINUX_VERSION_CODE == KERNEL_VERSION(2,6,22)
|
||
|
+#include "extra_2.6.22/bttv.h"
|
||
|
+#include "extra_2.6.22/bttvp.h"
|
||
|
+#else
|
||
|
+#include "../drivers/media/video/bt8xx/bttv.h"
|
||
|
+#include "../drivers/media/video/bt8xx/bttvp.h"
|
||
|
+#endif
|
||
|
+
|
||
|
+struct bttv bttvs[BTTV_MAX];
|
||
|
+unsigned int bttv_debug;
|
||
|
+unsigned int bttv_num; /* number of Bt848s in use */
|
||
|
+
|
||
|
+int bttv_get_cardinfo(unsigned int card, int *type, unsigned *cardid)
|
||
|
+{
|
||
|
+ printk("The bttv_* interface is obsolete and will go away,\n"
|
||
|
+ "please use the new, sysfs based interface instead.\n");
|
||
|
+ if (card >= bttv_num) {
|
||
|
+ return -1;
|
||
|
+ }
|
||
|
+ *type = bttvs[card].c.type;
|
||
|
+ *cardid = bttvs[card].cardid;
|
||
|
+ return 0;
|
||
|
+}
|
||
|
+
|
||
|
+wait_queue_head_t* bttv_get_gpio_queue(unsigned int card)
|
||
|
+{
|
||
|
+ struct bttv *btv;
|
||
|
+
|
||
|
+ if (card >= bttv_num) {
|
||
|
+ return NULL;
|
||
|
+ }
|
||
|
+
|
||
|
+ btv = &bttvs[card];
|
||
|
+ if (bttvs[card].shutdown) {
|
||
|
+ return NULL;
|
||
|
+ }
|
||
|
+ return &btv->gpioq;
|
||
|
+}
|
||
|
+
|
||
|
+
|
||
|
diff -Nru lirc-0.8.2.orig/drivers/lirc_gpio/bttv_deprecated.h lirc-0.8.2/drivers/lirc_gpio/bttv_deprecated.h
|
||
|
--- lirc-0.8.2.orig/drivers/lirc_gpio/bttv_deprecated.h 1970-01-01 01:00:00.000000000 +0100
|
||
|
+++ lirc-0.8.2/drivers/lirc_gpio/bttv_deprecated.h 2007-12-22 16:09:37.000000000 +0100
|
||
|
@@ -0,0 +1,6 @@
|
||
|
+//Temporarily re-added for Ubuntu Kernel 2.6.22 until upstream
|
||
|
+//Resolution is reached.
|
||
|
+extern wait_queue_head_t* bttv_get_gpio_queue(unsigned int card);
|
||
|
+extern int bttv_get_cardinfo(unsigned int card, int *type,
|
||
|
+ unsigned int *cardid);
|
||
|
+
|
||
|
diff -Nru lirc-0.8.2.orig/drivers/lirc_gpio/lirc_gpio.c lirc-0.8.2/drivers/lirc_gpio/lirc_gpio.c
|
||
|
--- lirc-0.8.2.orig/drivers/lirc_gpio/lirc_gpio.c 2007-02-13 07:45:15.000000000 +0100
|
||
|
+++ lirc-0.8.2/drivers/lirc_gpio/lirc_gpio.c 2007-12-22 16:10:29.000000000 +0100
|
||
|
@@ -54,6 +54,7 @@
|
||
|
#else
|
||
|
#include "../drivers/media/video/bt8xx/bttv.h"
|
||
|
#include "../drivers/media/video/bt8xx/bttvp.h"
|
||
|
+#include "bttv_deprecated.h"
|
||
|
#endif
|
||
|
|
||
|
#if BTTV_VERSION_CODE < KERNEL_VERSION(0,7,45)
|
||
|
diff -Nru lirc-0.8.2.orig/drivers/lirc_gpio/Makefile.am lirc-0.8.2/drivers/lirc_gpio/Makefile.am
|
||
|
--- lirc-0.8.2.orig/drivers/lirc_gpio/Makefile.am 2004-04-25 18:29:25.000000000 +0200
|
||
|
+++ lirc-0.8.2/drivers/lirc_gpio/Makefile.am 2007-12-22 16:09:37.000000000 +0100
|
||
|
@@ -5,9 +5,9 @@
|
||
|
## this is so that Automake includes the C compiling definitions, and
|
||
|
## includes the source files in the distribution.
|
||
|
EXTRA_PROGRAMS = automake_dummy
|
||
|
-automake_dummy_SOURCES = lirc_gpio.c
|
||
|
+automake_dummy_SOURCES = lirc_gpio.c bttv_deprecated.o
|
||
|
|
||
|
## there is no *just* object file support in automake. This is close enough
|
||
|
-module_DATA = lirc_gpio.o
|
||
|
+module_DATA = lirc_gpio.o bttv_deprecated.o
|
||
|
|
||
|
include ../Makefile.common
|