summaryrefslogtreecommitdiffstats
path: root/tdecore
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2017-06-17 12:39:35 +0200
committerSlávek Banko <slavek.banko@axis.cz>2017-06-17 12:39:35 +0200
commita73511a98d46bd9cceff8da7819b8ab523b9ad6c (patch)
tree5ef6268d147f67b61a65960d236c79ac301b853b /tdecore
parent2aa548763e7d1dd7a10427df45988a78b3e97b8b (diff)
downloadtdelibs-a73511a98d46bd9cceff8da7819b8ab523b9ad6c.tar.gz
tdelibs-a73511a98d46bd9cceff8da7819b8ab523b9ad6c.zip
tdehwlib: Allow to classify virtual devices by subsystem
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'tdecore')
-rw-r--r--tdecore/tdehw/tdehardwaredevices.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tdecore/tdehw/tdehardwaredevices.cpp b/tdecore/tdehw/tdehardwaredevices.cpp
index 5669fe55c..d45c79b2d 100644
--- a/tdecore/tdehw/tdehardwaredevices.cpp
+++ b/tdecore/tdehw/tdehardwaredevices.cpp
@@ -2090,9 +2090,6 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD
if (devicesubsystem == "backlight") {
if (!device) device = new TDEBacklightDevice(TDEGenericDeviceType::Backlight);
}
- if (systempath.lower().startsWith("/sys/devices/virtual")) {
- if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::OtherVirtual);
- }
if (systempath.lower().startsWith("/sys/module/")
|| (systempath.lower().startsWith("/sys/kernel/"))) {
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Platform); // FIXME Should go into a new kernel module category when the tdelibs ABI can be broken again
@@ -2288,6 +2285,9 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD
if (!device) device = new TDEBatteryDevice(TDEGenericDeviceType::Battery);
}
}
+ if (systempath.lower().startsWith("/sys/devices/virtual")) {
+ if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::OtherVirtual);
+ }
// Moderate accuracy classification, if PCI device class is available
// See http://www.acm.uiuc.edu/sigops/roll_your_own/7.c.1.html for codes and meanings