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/usb/Kconfig | |
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/usb/Kconfig')
-rw-r--r-- | drivers/media/usb/Kconfig | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/drivers/media/usb/Kconfig b/drivers/media/usb/Kconfig index f97153df3c84..8de08704f8e4 100644 --- a/drivers/media/usb/Kconfig +++ b/drivers/media/usb/Kconfig @@ -12,53 +12,64 @@ if MEDIA_USB_SUPPORT if MEDIA_CAMERA_SUPPORT comment "Webcam devices" -source "drivers/media/usb/uvc/Kconfig" + +source "drivers/media/usb/cpia2/Kconfig" source "drivers/media/usb/gspca/Kconfig" source "drivers/media/usb/pwc/Kconfig" -source "drivers/media/usb/cpia2/Kconfig" -source "drivers/media/usb/zr364xx/Kconfig" -source "drivers/media/usb/stkwebcam/Kconfig" source "drivers/media/usb/s2255/Kconfig" +source "drivers/media/usb/stkwebcam/Kconfig" source "drivers/media/usb/usbtv/Kconfig" +source "drivers/media/usb/uvc/Kconfig" +source "drivers/media/usb/zr364xx/Kconfig" + endif if MEDIA_ANALOG_TV_SUPPORT comment "Analog TV USB devices" -source "drivers/media/usb/pvrusb2/Kconfig" + +source "drivers/media/usb/go7007/Kconfig" source "drivers/media/usb/hdpvr/Kconfig" +source "drivers/media/usb/pvrusb2/Kconfig" source "drivers/media/usb/stk1160/Kconfig" -source "drivers/media/usb/go7007/Kconfig" + endif if (MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT) comment "Analog/digital TV USB devices" + source "drivers/media/usb/au0828/Kconfig" source "drivers/media/usb/cx231xx/Kconfig" source "drivers/media/usb/tm6000/Kconfig" -endif +endif if I2C && MEDIA_DIGITAL_TV_SUPPORT comment "Digital TV USB devices" -source "drivers/media/usb/dvb-usb/Kconfig" + +source "drivers/media/usb/as102/Kconfig" +source "drivers/media/usb/b2c2/Kconfig" source "drivers/media/usb/dvb-usb-v2/Kconfig" +source "drivers/media/usb/dvb-usb/Kconfig" +source "drivers/media/usb/siano/Kconfig" source "drivers/media/usb/ttusb-budget/Kconfig" source "drivers/media/usb/ttusb-dec/Kconfig" -source "drivers/media/usb/siano/Kconfig" -source "drivers/media/usb/b2c2/Kconfig" -source "drivers/media/usb/as102/Kconfig" + endif if (MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT) comment "Webcam, TV (analog/digital) USB devices" + source "drivers/media/usb/em28xx/Kconfig" + endif if MEDIA_SDR_SUPPORT comment "Software defined radio USB devices" + source "drivers/media/usb/airspy/Kconfig" source "drivers/media/usb/hackrf/Kconfig" source "drivers/media/usb/msi2500/Kconfig" + endif endif #MEDIA_USB_SUPPORT |