WSL2-Linux-Kernel/drivers/media/radio
Mauro Carvalho Chehab 6cdc31b2d7 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>
2022-03-18 05:58:35 +01:00
..
si470x media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
si4713 media: radio: si4713: constify static struct v4l2_ioctl_ops 2021-06-02 13:26:11 +02:00
wl128x media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
Kconfig media: media/*/Kconfig: sort entries 2022-03-18 05:58:35 +01:00
Makefile media: Makefiles: sort entries where it fits 2022-03-14 09:42:59 +01:00
dsbr100.c
lm7000.h
radio-aimslab.c
radio-aztech.c
radio-cadet.c
radio-gemtek.c
radio-isa.c isa: Make the remove callback for isa drivers return void 2021-01-26 07:42:27 +01:00
radio-isa.h isa: Make the remove callback for isa drivers return void 2021-01-26 07:42:27 +01:00
radio-keene.c
radio-ma901.c
radio-maxiradio.c media: use getter/setter functions 2021-03-11 11:59:42 +01:00
radio-miropcm20.c
radio-mr800.c
radio-raremono.c
radio-rtrack2.c
radio-sf16fmi.c media: media/radio: make array probe_ports static const 2022-01-23 21:18:43 +01:00
radio-sf16fmr2.c isa: Make the remove callback for isa drivers return void 2021-01-26 07:42:27 +01:00
radio-shark.c
radio-shark2.c
radio-si476x.c media: radio-si476x: drop a container_of() abstraction macro 2021-11-29 13:23:14 +01:00
radio-tea5764.c
radio-tea5777.c
radio-tea5777.h
radio-terratec.c
radio-timb.c
radio-trust.c
radio-typhoon.c
radio-wl1273.c media: radio-wl1273: Avoid card name truncation 2021-09-30 10:07:59 +02:00
radio-zoltrix.c
saa7706h.c
tea575x.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
tef6862.c