diff options
author | khali <khali@7894878c-1315-0410-8ee3-d5d059ff63e0> | 2015-05-31 11:53:30 +0000 |
---|---|---|
committer | khali <khali@7894878c-1315-0410-8ee3-d5d059ff63e0> | 2015-05-31 11:53:30 +0000 |
commit | 2457db97b5351549c9d08352dd528046598bfc62 (patch) | |
tree | 0fa2717fc335d973cfc3bb18506adb871ef0f3f5 | |
parent | 305991b604bf30e1262a571d3cd1be21e481ad8f (diff) | |
download | lm-sensors-2457db97b5351549c9d08352dd528046598bfc62.tar.gz |
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.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@6282 7894878c-1315-0410-8ee3-d5d059ff63e0
-rw-r--r-- | CHANGES | 1 | ||||
-rwxr-xr-x | prog/detect/sensors-detect | 4 |
2 files changed, 4 insertions, 1 deletions
@@ -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 diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index cd3e662e..ceab7624 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -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; |