Skip to content

Commit f5fc3ff

Browse files
committed
Do not introduce a new field in i2c_smbus class
1 parent 23ec687 commit f5fc3ff

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

Controllers/SapphireGPUController/SapphireGPUControllerDetect.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ bool IsRecognizedI2CBus(i2c_smbus_interface* bus)
4747
const char *name;
4848
while((name = RECOGNIZED_I2C_BUS_NAMES[idx++]) != nullptr)
4949
{
50-
if (std::strcmp(name, bus->bus_name) == 0) return true;
50+
if(std::strcmp(name, bus->device_name) == 0)
51+
{
52+
return true;
53+
}
5154
}
5255

5356
return false;

i2c_smbus/Linux/i2c_smbus_linux.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,7 @@ bool i2c_smbus_linux_detect()
232232
}
233233

234234
bus = new i2c_smbus_linux();
235-
strcpy(bus->device_name, device_path);
236-
strcpy(bus->bus_name, device_string);
235+
strcpy(bus->device_name, device_string);
237236
bus->handle = test_fd;
238237
bus->pci_device = pci_device;
239238
bus->pci_vendor = pci_vendor;

i2c_smbus/Windows/i2c_smbus_amdadl.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ i2c_smbus_amdadl::i2c_smbus_amdadl(ADL_CONTEXT_HANDLE context, int adapter_index
130130
this->pci_subsystem_device = sbd_id;
131131
this->port_id = 1;
132132
strcpy(this->device_name, "AMD ADL");
133-
strcpy(this->bus_name, "AMD ADL");
134133
}
135134
}
136135
}

i2c_smbus/i2c_smbus.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ class i2c_smbus_interface
7777
{
7878
public:
7979
char device_name[512];
80-
char bus_name[512];
8180

8281
int port_id;
8382
int pci_device;

0 commit comments

Comments
 (0)