This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/v4l-utils.git tree:

Subject: gen_keytables.pl: make it work with the newer kernel sources
Author:  Mauro Carvalho Chehab <[email protected]>
Date:    Mon Dec 20 15:02:30 2010 -0200

Instead of /IR, use /rc for remote keymap directory. Also, some struct
names changed.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 utils/keytable/Makefile         |    1 +
 utils/keytable/gen_keytables.pl |   24 ++++++++++++++----------
 2 files changed, 15 insertions(+), 10 deletions(-)

---

http://git.linuxtv.org/v4l-utils.git?a=commitdiff;h=5accd05d8aaa6b126e042447df2a20fe8394f64b

diff --git a/utils/keytable/Makefile b/utils/keytable/Makefile
index dc3252e..41f4050 100644
--- a/utils/keytable/Makefile
+++ b/utils/keytable/Makefile
@@ -27,6 +27,7 @@ sync-with-kernel:
        @printf "\t{ NULL, 0}\n};\n" >>parse.h
 
        @-mkdir -p rc_keymaps
+       @-rm rc_keymaps/*
        @echo storing existing keymaps at rc_keymaps/
        @./gen_keytables.pl $(KERNEL_DIR);
 
diff --git a/utils/keytable/gen_keytables.pl b/utils/keytable/gen_keytables.pl
index 7a62ae3..cf47183 100755
--- a/utils/keytable/gen_keytables.pl
+++ b/utils/keytable/gen_keytables.pl
@@ -80,29 +80,33 @@ sub parse_file($)
        printf "processing file $filename\n" if ($debug);
        open IN, "<$filename" or die "couldn't find $filename";
        while (<IN>) {
-               if (m/struct\s+ir_scancode\s+(\w[\w\d_]+)/) {
+               if (m/struct\s+rc_map_table\s+(\w[\w\d_]+)/) {
                        flush($filename);
 
                        $keyname = $1;
-                       $keyname =~ s/^ir_codes_//;
+                       $keyname =~ s/^rc_map_//;
                        $keyname =~ s/_table$//;
                        $read = 1;
                        next;
                }
-               if (m/struct\s+rc_keymap.*=\s+{/) {
+               if (m/struct\s+rc_map_list.*=\s+{/) {
                        $check_type = 1;
                        next;
                }
-               if (m/\.name\s*=\s*(RC_MAP_[^\s\,]+)/) {
-                       $name = $1;
-               }
-
                if ($check_type) {
+                       if (m/\.name\s*=\s*(RC_MAP_[^\s\,]+)/) {
+                               $name = $1;
+                               $keyname = $1;
+                               $keyname =~ s/^RC_MAP_//;
+                               $keyname =~ tr/A-Z/a-z/;
+                               $keyname =~ s/_table$//;
+                       }
+
                        if (m/^\s*}/) {
                                $check_type = 0;
                                next;
                        }
-                       if (m/IR_TYPE_([\w\d_]+)/) {
+                       if (m/RC_TYPE_([\w\d_]+)/) {
                                $type = $1;
                        }
                        next;
@@ -194,11 +198,11 @@ print OUT_MAP << "EOF";
 #driver table                    file
 EOF
 
-find({wanted => \&parse_dir, no_chdir => 1}, 
"$kernel_dir/drivers/media/IR/keymaps");
+find({wanted => \&parse_dir, no_chdir => 1}, 
"$kernel_dir/drivers/media/rc/keymaps");
 
 foreach my $file (@ir_files) {
        parse_file "$kernel_dir/$file";
 }
 
 printf STDERR "WARNING: there are %d tables not defined at rc_maps.h\n", 
$warn_all if ($warn_all);
-close OUT_MAP;
\ No newline at end of file
+close OUT_MAP;

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to