Commit 3e3745f5 authored by Steven Rostedt's avatar Steven Rostedt Committed by Greg Kroah-Hartman

localmodconfig: Process source kconfig files as they are found

commit ced9cb1a 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:
parent ae373596
...@@ -156,7 +156,6 @@ sub read_kconfig { ...@@ -156,7 +156,6 @@ sub read_kconfig {
my $state = "NONE"; my $state = "NONE";
my $config; my $config;
my @kconfigs;
my $cont = 0; my $cont = 0;
my $line; my $line;
...@@ -190,7 +189,13 @@ sub read_kconfig { ...@@ -190,7 +189,13 @@ sub read_kconfig {
# collect any Kconfig sources # collect any Kconfig sources
if (/^source\s*"(.*)"/) { 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 # configs found
...@@ -250,14 +255,6 @@ sub read_kconfig { ...@@ -250,14 +255,6 @@ sub read_kconfig {
} }
} }
close($kinfile); 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) { if ($kconfig) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment