mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2025-12-23 23:37:48 -05:00
Do not introduce a new field in i2c_smbus class
This commit is contained in:
@@ -47,7 +47,10 @@ bool IsRecognizedI2CBus(i2c_smbus_interface* bus)
|
||||
const char *name;
|
||||
while((name = RECOGNIZED_I2C_BUS_NAMES[idx++]) != nullptr)
|
||||
{
|
||||
if (std::strcmp(name, bus->bus_name) == 0) return true;
|
||||
if(std::strcmp(name, bus->device_name) == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -232,8 +232,7 @@ bool i2c_smbus_linux_detect()
|
||||
}
|
||||
|
||||
bus = new i2c_smbus_linux();
|
||||
strcpy(bus->device_name, device_path);
|
||||
strcpy(bus->bus_name, device_string);
|
||||
strcpy(bus->device_name, device_string);
|
||||
bus->handle = test_fd;
|
||||
bus->pci_device = pci_device;
|
||||
bus->pci_vendor = pci_vendor;
|
||||
|
||||
@@ -130,7 +130,6 @@ i2c_smbus_amdadl::i2c_smbus_amdadl(ADL_CONTEXT_HANDLE context, int adapter_index
|
||||
this->pci_subsystem_device = sbd_id;
|
||||
this->port_id = 1;
|
||||
strcpy(this->device_name, "AMD ADL");
|
||||
strcpy(this->bus_name, "AMD ADL");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,6 @@ class i2c_smbus_interface
|
||||
{
|
||||
public:
|
||||
char device_name[512];
|
||||
char bus_name[512];
|
||||
|
||||
int port_id;
|
||||
int pci_device;
|
||||
|
||||
Reference in New Issue
Block a user