From 82067659cc475dcb3b75e15a65991cadcf49d707 Mon Sep 17 00:00:00 2001 From: biospb <42325079+biospb@users.noreply.github.com> Date: Thu, 9 Jan 2020 18:48:03 +0300 Subject: [PATCH] HWMON was not working for Amd gpu with bus id > 9 --- libhwmon/wrapamdsysfs.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libhwmon/wrapamdsysfs.cpp b/libhwmon/wrapamdsysfs.cpp index 266135fc3..da0f2855c 100644 --- a/libhwmon/wrapamdsysfs.cpp +++ b/libhwmon/wrapamdsysfs.cpp @@ -119,10 +119,10 @@ wrap_amdsysfs_handle* wrap_amdsysfs_create() try { - PciDomain = std::stoi(pciIdParts.at(0), nullptr, 10); - PciBus = std::stoi(pciIdParts.at(1), nullptr, 10); - PciDevice = std::stoi(pciIdParts.at(2), nullptr, 10); - PciFunction = std::stoi(pciIdParts.at(3), nullptr, 10); + PciDomain = std::stoi(pciIdParts.at(0), nullptr, 16); + PciBus = std::stoi(pciIdParts.at(1), nullptr, 16); + PciDevice = std::stoi(pciIdParts.at(2), nullptr, 16); + PciFunction = std::stoi(pciIdParts.at(3), nullptr, 16); } catch (const std::exception&) {