]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
localmodconfig: Process source kconfig files as they are found
authorSteven Rostedt <rostedt@goodmis.org>
Mon, 29 Apr 2013 19:18:38 +0000 (15:18 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 May 2013 03:08:22 +0000 (20:08 -0700)
commit ced9cb1af1e3486cc14dca755a1b3fbadf06e90b upstream.

A bug was reported that caused localmodconfig to not keep all the
dependencies of ATH9K. This was caused by the kconfig file:

In drivers/net/wireless/ath/Kconfig:

scripts/kconfig/streamline_config.pl

index 33689396953a7e46d5152df204ddb802ec4b2a39..68b85e1fe8f78d6da4513134e0250511ad7b0db8 100644 (file)
@@ -156,7 +156,6 @@ sub read_kconfig {
 
     my $state = "NONE";
     my $config;
-    my @kconfigs;
 
     my $cont = 0;
     my $line;
@@ -190,7 +189,13 @@ sub read_kconfig {
 
        # collect any Kconfig sources
        if (/^source\s*"(.*)"/) {
-           $kconfigs[$#kconfigs+1] = $1;
+           my $kconfig = $1;
+           # prevent reading twice.
+           if (!defined($read_kconfigs{$kconfig})) {
+               $read_kconfigs{$kconfig} = 1;
+               read_kconfig($kconfig);
+           }
+           next;
        }
 
        # configs found
@@ -250,14 +255,6 @@ sub read_kconfig {
        }
     }
     close($kinfile);
-
-    # read in any configs that were found.
-    foreach my $kconfig (@kconfigs) {
-       if (!defined($read_kconfigs{$kconfig})) {
-           $read_kconfigs{$kconfig} = 1;
-           read_kconfig($kconfig);
-       }
-    }
 }
 
 if ($kconfig) {