diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2017-06-17 12:39:35 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2017-06-17 12:39:46 +0200 |
commit | 69112fe54a0c771db49a8dc921c03c08b3dbeefa (patch) | |
tree | de68d3cafb92b38dc2b1ebe4f0ddd4010dce1596 | |
parent | 41d41d2af9105351768cae1b39c7bce5540b8fe6 (diff) | |
download | tdelibs-69112fe54a0c771db49a8dc921c03c08b3dbeefa.tar.gz tdelibs-69112fe54a0c771db49a8dc921c03c08b3dbeefa.zip |
tdehwlib: Allow to classify virtual devices by subsystem
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit a73511a98d46bd9cceff8da7819b8ab523b9ad6c)
-rw-r--r-- | tdecore/tdehw/tdehardwaredevices.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tdecore/tdehw/tdehardwaredevices.cpp b/tdecore/tdehw/tdehardwaredevices.cpp index 61abed0c2..fde568acf 100644 --- a/tdecore/tdehw/tdehardwaredevices.cpp +++ b/tdecore/tdehw/tdehardwaredevices.cpp @@ -2068,9 +2068,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 @@ -2241,6 +2238,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 |