mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-02 13:30:30 +00:00
sensors-detect: Detect graphics card in all cases
On recent kernels, the i2c bus may not be an immediate child of the graphics device, instead there can be a drm class device in between. Treat all drm class devices as graphics devices so that probing the i2c bus is disabled by default as intended.
This commit is contained in:
1 parent
15cafdf597
commit
332c6fe2b9
2 files changed
+4
-1
No files matched your search
@@ -37,6 +37,7 @@ SVN HEAD
|
||||
Document driver support for NCT7802Y
|
||||
Add detection of NCT7904D
|
||||
Add detection of IT8790E
|
||||
Fix graphics cards detection (#2386, #2392)
|
||||
|
||||
3.3.5 "Happy Birthday Beddy" (2014-01-22)
|
||||
libsensors: Improve documentation of two functions
|
||||
|
||||
@@ -3897,7 +3897,9 @@ sub get_pci_class
|
||||
my ($subsystem, $class);
|
||||
|
||||
$subsystem = sysfs_device_subsystem($device);
|
||||
return 0 unless defined $subsystem && $subsystem eq "pci";
|
||||
return 0 unless defined $subsystem;
|
||||
return 0x0300 if $subsystem eq "drm"; # Graphics card
|
||||
return 0 unless $subsystem eq "pci";
|
||||
|
||||
$class = sysfs_device_attribute($device, "class");
|
||||
return 0 unless defined $class;
|
||||
|
||||
Reference in new issue
Block a user