mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-11 16:40:16 +00:00
Support more bus types (part 2 of 2). Originally libsensors was very
i2c-centric. Make it more neutral so that we can cleanly support additional bus types such as SPI or One-Wire. This second part updates sensors_bus to use sensors_bus_id. Thanks to Mark M. Hoffman for showing me how the configuration file parser could be modified to support that change. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4687 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
7ee15371df
commit
a74addb5d4
5 files changed
+24
-21
No files matched your search
+2
-1
@@ -326,7 +326,8 @@ const char *sensors_get_adapter_name(const sensors_bus_id *bus)
|
||||
|
||||
/* bus types with several instances */
|
||||
for (i = 0; i < sensors_proc_bus_count; i++)
|
||||
if (sensors_proc_bus[i].number == bus->nr)
|
||||
if (sensors_proc_bus[i].bus.type == bus->type &&
|
||||
sensors_proc_bus[i].bus.nr == bus->nr)
|
||||
return sensors_proc_bus[i].adapter;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user