[PATCH] sensors-detect: Detect graphics card in all cases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
---
 prog/detect/sensors-detect |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- lm-sensors.orig/prog/detect/sensors-detect	2015-05-28 08:01:21.884379048 +0200
+++ lm-sensors/prog/detect/sensors-detect	2015-05-28 17:15:58.685620089 +0200
@@ -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;


-- 
Jean Delvare
SUSE L3 Support

_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors




[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux