diff options
author | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-03-14 13:01:05 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-03-18 07:58:35 +0300 |
commit | 6cdc31b2d7095af3d39f001b0d4e367a6f32664e (patch) | |
tree | d00cd220b6aed3328d5fd07c41e7c9ee9e26b3ae /drivers/media/test-drivers | |
parent | 9958d30f38b96fb763a10d44d18ddad39127d5f4 (diff) | |
download | linux-6cdc31b2d7095af3d39f001b0d4e367a6f32664e.tar.xz |
media: media/*/Kconfig: sort entries
Currently, the idems inside media Kconfig are out of order.
Sort them using the script below:
<script>
use strict;
use warnings;
my %config;
my @source;
my $out;
sub flush_config()
{
if (scalar %config) {
for my $c (sort keys %config) {
$out .= $config{$c} . "\n";
}
%config = ();
}
return if (!scalar @source);
$out .= "\n";
for my $s (sort @source) {
$out .= $s;
}
$out .= "\n";
@source = ();
}
sub sort_kconfig($)
{
my $fname = shift;
my $cur_config = "";
@source = ();
$out = "";
%config = ();
open IN, $fname or die;
while (<IN>) {
if (m/^config\s+(.*)/) {
$cur_config = $1;
$config{$cur_config} .= $_;
} elsif (m/^source\s+(.*)/) {
push @source, $_;
} elsif (m/^\s+/) {
if ($cur_config eq "") {
$out .= $_;
} else {
$config{$cur_config} .= $_;
}
} else {
flush_config();
$cur_config = "";
$out .= $_;
}
}
close IN or die;
flush_config();
$out =~ s/\n\n+/\n\n/g;
$out =~ s/\n+$/\n/;
open OUT, ">$fname";
print OUT $out;
close OUT;
}
for my $fname(@ARGV) {
sort_kconfig $fname
}
</script>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/test-drivers')
-rw-r--r-- | drivers/media/test-drivers/Kconfig | 6 | ||||
-rw-r--r-- | drivers/media/test-drivers/vidtv/Kconfig | 1 |
2 files changed, 2 insertions, 5 deletions
diff --git a/drivers/media/test-drivers/Kconfig b/drivers/media/test-drivers/Kconfig index d663d822ec75..51cf27834df0 100644 --- a/drivers/media/test-drivers/Kconfig +++ b/drivers/media/test-drivers/Kconfig @@ -6,10 +6,6 @@ menuconfig V4L_TEST_DRIVERS if V4L_TEST_DRIVERS -source "drivers/media/test-drivers/vimc/Kconfig" - -source "drivers/media/test-drivers/vivid/Kconfig" - config VIDEO_VIM2M tristate "Virtual Memory-to-Memory Driver" depends on VIDEO_DEV @@ -22,6 +18,8 @@ config VIDEO_VIM2M framework. source "drivers/media/test-drivers/vicodec/Kconfig" +source "drivers/media/test-drivers/vimc/Kconfig" +source "drivers/media/test-drivers/vivid/Kconfig" endif #V4L_TEST_DRIVERS diff --git a/drivers/media/test-drivers/vidtv/Kconfig b/drivers/media/test-drivers/vidtv/Kconfig index 22c4fd39461f..e511e51c0b5b 100644 --- a/drivers/media/test-drivers/vidtv/Kconfig +++ b/drivers/media/test-drivers/vidtv/Kconfig @@ -7,5 +7,4 @@ config DVB_VIDTV validate the existing APIs in the media subsystem. It can also aid developers working on userspace applications. - When in doubt, say N. |