diff -ur linux/drivers/media/common/ir-keymaps-make.pl~ linux/drivers/media/common/ir-keymaps-make.pl --- linux/drivers/media/common/ir-keymaps-make.pl~ 2006-01-19 16:00:27.000000000 +0000 +++ linux/drivers/media/common/ir-keymaps-make.pl 2006-01-20 16:38:23.000000000 +0000 @@ -5,6 +5,8 @@ # Written by Darren Salt # Licence: GPL v2 or later (see below). +use POSIX; + print <<'EOF'; /* Keytables for supported remote controls. This file is automatically generated. @@ -82,7 +84,8 @@ print "\nconst s16 ${label}[] = {"; my $i = -1; my $prev = 0; - my $col = 0; + # default to 128 entries if the keymap is empty + my $col = output (0, $max > 0 ? 1 << ceil (log ($max)/log 2) : 128); while (++$i <= $max) { next unless defined $mapping{$i};