linux/drivers/media/usb
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
..
airspy media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
as102 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 118 2019-05-24 17:39:02 +02:00
au0828 media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
b2c2 media: b2c2-flexcop-usb: fix some whitespace coding style 2021-12-14 16:19:04 +01:00
cpia2 media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
cx231xx media: cx231xx/cx231xx.h: Remove repeated struct declaration 2021-04-06 16:10:19 +02:00
dvb-usb media: media/*/Kconfig: sort entries 2022-03-18 05:58:35 +01:00
dvb-usb-v2 media: media/*/Kconfig: sort entries 2022-03-18 05:58:35 +01:00
em28xx media: xc2028: rename the driver from tuner-xc2028 2022-03-12 16:59:50 +01:00
go7007 media: usb: go7007: s2250-board: fix leak in probe() 2022-02-22 09:41:12 +01:00
gspca media: media/*/Kconfig: sort entries 2022-03-18 05:58:35 +01:00
hackrf media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
hdpvr media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
msi2500 media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
pvrusb2 media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
pwc media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
s2255 media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
siano media: siano: remove duplicate USB device IDs 2021-12-07 11:29:58 +01:00
stk1160 media: stk1160: use dma_alloc_noncontiguous API 2022-03-07 11:01:22 +01:00
stkwebcam media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
tm6000 media: xc2028: rename the driver from tuner-xc2028 2022-03-12 16:59:50 +01:00
ttusb-budget media: dvb-ttusb-budget: cleanup printk logic 2020-09-03 11:15:47 +02:00
ttusb-dec media: ttusb-dec: avoid release of non-acquired mutex 2021-09-30 10:07:40 +02:00
usbtv media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
uvc media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
zr364xx 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