diff options
author | Steven Rostedt <rostedt@goodmis.org> | 2013-04-29 15:18:38 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-07 20:33:11 -0700 |
commit | 3e3745f536406acd16c64438fffc6b73760644d3 (patch) | |
tree | f4a8f0a8383de02cba583124c76bd7c01532ac71 | |
parent | ae37359690c7d3dad9504041c0c414e004c9a275 (diff) |
localmodconfig: Process source kconfig files as they are found
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:
-rw-r--r-- | scripts/kconfig/streamline_config.pl | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl index 33689396953..68b85e1fe8f 100644 --- a/scripts/kconfig/streamline_config.pl +++ b/scripts/kconfig/streamline_config.pl @@ -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) { |