diff options
author | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-03-14 11:01:05 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-03-18 05:58:35 +0100 |
commit | 6cdc31b2d7095af3d39f001b0d4e367a6f32664e (patch) | |
tree | d00cd220b6aed3328d5fd07c41e7c9ee9e26b3ae /drivers/media/usb/gspca | |
parent | 9958d30f38b96fb763a10d44d18ddad39127d5f4 (diff) |
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/gspca')
-rw-r--r-- | drivers/media/usb/gspca/Kconfig | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/drivers/media/usb/gspca/Kconfig b/drivers/media/usb/gspca/Kconfig index 2b106a7fcf4c..9c1939ce6be4 100644 --- a/drivers/media/usb/gspca/Kconfig +++ b/drivers/media/usb/gspca/Kconfig @@ -16,13 +16,8 @@ menuconfig USB_GSPCA To compile this driver as modules, choose M here: the module will be called gspca_main. - if USB_GSPCA && VIDEO_DEV -source "drivers/media/usb/gspca/m5602/Kconfig" -source "drivers/media/usb/gspca/stv06xx/Kconfig" -source "drivers/media/usb/gspca/gl860/Kconfig" - config USB_GSPCA_BENQ tristate "Benq USB Camera Driver" depends on VIDEO_DEV && USB_GSPCA @@ -251,6 +246,15 @@ config USB_GSPCA_SONIXJ To compile this driver as a module, choose M here: the module will be called gspca_sonixj +config USB_GSPCA_SPCA1528 + tristate "SPCA1528 USB Camera Driver" + depends on VIDEO_DEV && USB_GSPCA + help + Say Y here if you want support for cameras based on the SPCA1528 chip. + + To compile this driver as a module, choose M here: the + module will be called gspca_spca1528. + config USB_GSPCA_SPCA500 tristate "SPCA500 USB Camera Driver" depends on VIDEO_DEV && USB_GSPCA @@ -305,15 +309,6 @@ config USB_GSPCA_SPCA561 To compile this driver as a module, choose M here: the module will be called gspca_spca561. -config USB_GSPCA_SPCA1528 - tristate "SPCA1528 USB Camera Driver" - depends on VIDEO_DEV && USB_GSPCA - help - Say Y here if you want support for cameras based on the SPCA1528 chip. - - To compile this driver as a module, choose M here: the - module will be called gspca_spca1528. - config USB_GSPCA_SQ905 tristate "SQ Technologies SQ905 based USB Camera Driver" depends on VIDEO_DEV && USB_GSPCA @@ -453,4 +448,8 @@ config USB_GSPCA_ZC3XX To compile this driver as a module, choose M here: the module will be called gspca_zc3xx. +source "drivers/media/usb/gspca/gl860/Kconfig" +source "drivers/media/usb/gspca/m5602/Kconfig" +source "drivers/media/usb/gspca/stv06xx/Kconfig" + endif |