Clear port_ID just like the remaining items that are updated each loop.
Re-add code to make NVIDIA cards work with the updated device manager. Commit amended by Adam Honse <calcprogrammer1@gmail.com>
This commit is contained in:
parent
678e2fbc33
commit
86034a9ce5
1 changed files with 4 additions and 0 deletions
|
|
@ -83,6 +83,7 @@ void i2c_smbus_linux_detect(std::vector<i2c_smbus_interface*> &busses)
|
|||
pci_device = 0;
|
||||
pci_subsystem_vendor = 0;
|
||||
pci_subsystem_device = 0;
|
||||
port_id = 0;
|
||||
|
||||
// Get PCI Vendor
|
||||
snprintf(path, sizeof(path), "%s%s%s", driver_path, ent->d_name, "/device/vendor");
|
||||
|
|
@ -96,6 +97,9 @@ void i2c_smbus_linux_detect(std::vector<i2c_smbus_interface*> &busses)
|
|||
close(test_fd);
|
||||
}
|
||||
|
||||
// Get port ID for NVidia GPUs
|
||||
sscanf(device_string, "NVIDIA i2c adapter %hu at", &port_id);
|
||||
|
||||
// Get PCI Device
|
||||
snprintf(path, sizeof(path), "%s%s%s", driver_path, ent->d_name, "/device/device");
|
||||
test_fd = open(path, O_RDONLY);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue