mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-29 13:28:01 +00:00
Fix listing of needed bus drivers.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5584 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
parent
a16b7a42aa
commit
bcddaa74a1
@ -2105,6 +2105,20 @@ sub load_module
|
|||||||
$modules_list{$normalized} = 1;
|
$modules_list{$normalized} = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub loaded_by_us
|
||||||
|
{
|
||||||
|
my $sought = shift;
|
||||||
|
local $_;
|
||||||
|
|
||||||
|
$sought =~ tr/-/_/;
|
||||||
|
foreach (@modules_we_loaded) {
|
||||||
|
my $module = $_;
|
||||||
|
$module =~ tr/-/_/;
|
||||||
|
return 1 if $module eq $sought;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
sub initialize_modules_supported
|
sub initialize_modules_supported
|
||||||
{
|
{
|
||||||
foreach my $chip (@chip_ids) {
|
foreach my $chip (@chip_ids) {
|
||||||
@ -5088,7 +5102,7 @@ sub generate_modprobes
|
|||||||
# the adapter drivers so that the numbers will be the same. If not, then
|
# the adapter drivers so that the numbers will be the same. If not, then
|
||||||
# we only load the adapter drivers which are useful.
|
# we only load the adapter drivers which are useful.
|
||||||
foreach $adap (@i2c_adapters) {
|
foreach $adap (@i2c_adapters) {
|
||||||
next unless contains($adap->{driver}, @modules_we_loaded);
|
next unless loaded_by_us($adap->{driver});
|
||||||
next if not defined $configfile and not $adap->{used};
|
next if not defined $configfile and not $adap->{used};
|
||||||
$modprobes .= "# I2C adapter drivers\n" unless defined $modprobes;
|
$modprobes .= "# I2C adapter drivers\n" unless defined $modprobes;
|
||||||
$modprobes .= "modprobe $adap->{driver}\n"
|
$modprobes .= "modprobe $adap->{driver}\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user