The patch number 10131 was added via Mauro Carvalho Chehab <[email protected]>
to http://linuxtv.org/hg/v4l-dvb master development tree.
Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel
If anyone has any objections, please let us know by sending a message to:
[email protected]
------
From: Mauro Carvalho Chehab <[email protected]>
Add compat support for usb_endpoint_type()
While here, make sure that config-compat.h is rebuild if the script
change.
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---
v4l/Makefile | 2 +-
v4l/compat.h | 19 ++++++++++++-------
v4l/scripts/make_config_compat.pl | 20 ++++++++++++++++++++
3 files changed, 33 insertions(+), 8 deletions(-)
diff -r 333f701e1ae8 -r 9fc6c5d0998c v4l/Makefile
--- a/v4l/Makefile Tue Dec 30 00:49:22 2008 +0000
+++ b/v4l/Makefile Tue Dec 30 08:47:03 2008 -0200
@@ -256,7 +256,7 @@ oss:
oss:
ln -sf . oss
-config-compat.h:: $(obj)/.version .myconfig
+config-compat.h:: $(obj)/.version .myconfig scripts/make_config_compat.pl
perl scripts/make_config_compat.pl $(SRCDIR) $(obj)/.myconfig
$(obj)/config-compat.h
kernel-links makelinks::
diff -r 333f701e1ae8 -r 9fc6c5d0998c v4l/compat.h
--- a/v4l/compat.h Tue Dec 30 00:49:22 2008 +0000
+++ b/v4l/compat.h Tue Dec 30 08:47:03 2008 -0200
@@ -339,14 +339,19 @@ usb_endpoint_is_int_in(const struct usb_
#define list_first_entry(ptr, type, member) \
list_entry((ptr)->next, type, member)
+/*
+ * uninitialized_var() macro
+ */
+#define uninitialized_var(x) x = x
+#endif
+
#ifdef NEED_NETDEV_PRIV
#define netdev_priv(dev) ((dev)->priv)
#endif
-/*
- * uninitialized_var() macro
- */
-#define uninitialized_var(x) x = x
-#endif
-
-#endif
+#ifdef NEED_USB_ENDPOINT_TYPE
+#define usb_endpoint_type(ep) \
+ ((ep)->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
+#endif
+
+#endif
diff -r 333f701e1ae8 -r 9fc6c5d0998c v4l/scripts/make_config_compat.pl
--- a/v4l/scripts/make_config_compat.pl Tue Dec 30 00:49:22 2008 +0000
+++ b/v4l/scripts/make_config_compat.pl Tue Dec 30 08:47:03 2008 -0200
@@ -212,6 +212,25 @@ sub check_net_dev()
if ($need_compat) {
$out.= "\n#define NEED_NETDEV_PRIV 1\n";
+ }
+ close INNET;
+}
+
+sub check_usb_endpoint_type()
+{
+ my $file = "$kdir/include/linux/usb.h";
+ my $need_compat = 1;
+
+ open INNET, "<$file" or die "File not found: $file";
+ while (<INNET>) {
+ if (m/usb_endpoint_type/) {
+ $need_compat = 0;
+ last;
+ }
+ }
+
+ if ($need_compat) {
+ $out.= "\n#define NEED_USB_ENDPOINT_TYPE 1\n";
}
close INNET;
}
@@ -229,6 +248,7 @@ sub check_other_dependencies()
check_pcm_lock();
check_algo_control();
check_net_dev();
+ check_usb_endpoint_type();
}
# Do the basic rules
---
Patch is available at:
http://linuxtv.org/hg/v4l-dvb/rev/9fc6c5d0998c63b75a5db288c8c7a27c369b380b
_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits