diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-11-26 08:47:12 +0100 |
---|---|---|
committer | Jean-Francois Moine <moinejf@free.fr> | 2008-11-26 08:47:12 +0100 |
commit | 891faaaa42567c3609045cff7972d61268b53b8e (patch) | |
tree | 96dd8ac4262bb382966109878286aa8388103e05 /v4l | |
parent | d6fee5ac91e4b7196341e6da1708ce5b4481cd79 (diff) | |
parent | 1f3f7671e12715041b3b002db1403ce4da682fda (diff) | |
download | mediapointer-dvb-s2-891faaaa42567c3609045cff7972d61268b53b8e.tar.gz mediapointer-dvb-s2-891faaaa42567c3609045cff7972d61268b53b8e.tar.bz2 |
merge: v4l-dvb
Diffstat (limited to 'v4l')
-rw-r--r-- | v4l/compat.h | 12 | ||||
-rwxr-xr-x | v4l/scripts/gentree.pl | 2 | ||||
-rwxr-xr-x | v4l/scripts/make_config_compat.pl | 40 | ||||
-rw-r--r-- | v4l/versions.txt | 2 |
4 files changed, 56 insertions, 0 deletions
diff --git a/v4l/compat.h b/v4l/compat.h index 1d042d96c..ad2d9df22 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -27,6 +27,10 @@ #include <sound/driver.h> #endif +#ifdef NEED_ALGO_CONTROL +#include <linux/i2c.h> +#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23) #define set_freezable() #define cancel_delayed_work_sync cancel_rearming_delayed_work @@ -231,6 +235,14 @@ static inline int list_is_singular(const struct list_head *head) ( x ) ) ) #endif +#ifdef NEED_ALGO_CONTROL +static inline int dummy_algo_control(struct i2c_adapter *adapter, + unsigned int cmd, unsigned long arg) +{ + return 0; +} +#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) #define div64_u64(a,b) div64_64(a,b) diff --git a/v4l/scripts/gentree.pl b/v4l/scripts/gentree.pl index fccaedff4..1968bb334 100755 --- a/v4l/scripts/gentree.pl +++ b/v4l/scripts/gentree.pl @@ -73,6 +73,8 @@ my %defs = ( 'BUZ_USE_HIMEM' => 1, 'NEED_SOUND_DRIVER_H' => 0, 'TTUSB_KERNEL' => 1, + 'NO_PCM_LOCK' => 0, + 'NEED_ALGO_CONTROL' => 0, ); ################################################################# diff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl index fdbc5eaba..3a8bdd81e 100755 --- a/v4l/scripts/make_config_compat.pl +++ b/v4l/scripts/make_config_compat.pl @@ -159,6 +159,44 @@ sub check_proc_create() close INNET; } +sub check_pcm_lock() +{ + my $file = "$kdir/include/sound/pcm.h"; + my $need_compat = 1; + + open INNET, "<$file" or die "File not found: $file"; + while (<INNET>) { + if (m/pcm_stream_lock/) { + $need_compat = 0; + last; + } + } + + if ($need_compat) { + $out.= "\n#define NO_PCM_LOCK 1\n"; + } + close INNET; +} + +sub check_algo_control() +{ + my $file = "$kdir/include/linux/i2c.h"; + my $need_compat = 0; + + open INNET, "<$file" or die "File not found: $file"; + while (<INNET>) { + if (m/algo_control/) { + $need_compat = 1; + last; + } + } + + if ($need_compat) { + $out.= "\n#define NEED_ALGO_CONTROL 1\n"; + } + close INNET; +} + sub check_other_dependencies() { check_spin_lock(); @@ -169,6 +207,8 @@ sub check_other_dependencies() check_is_singular(); check_clamp(); check_proc_create(); + check_pcm_lock(); + check_algo_control(); } # Do the basic rules diff --git a/v4l/versions.txt b/v4l/versions.txt index 3ef9af5d8..c09b5d69a 100644 --- a/v4l/versions.txt +++ b/v4l/versions.txt @@ -20,6 +20,8 @@ USB_STKWEBCAM DVB_DRX397XD # Assumes struct input_dev has a dev field DVB_DM1105 +# Need cancel_work_sync +VIDEO_CX18 [2.6.20] #This driver requires HID_REQ_GET_REPORT |