summaryrefslogtreecommitdiffstats
path: root/platform-intel.c
diff options
context:
space:
mode:
Diffstat (limited to 'platform-intel.c')
-rw-r--r--platform-intel.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/platform-intel.c b/platform-intel.c
index 7ad88315..9867697b 100644
--- a/platform-intel.c
+++ b/platform-intel.c
@@ -187,6 +187,16 @@ struct sys_dev *device_by_id(__u16 device_id)
return NULL;
}
+struct sys_dev *device_by_id_and_path(__u16 device_id, const char *path)
+{
+ struct sys_dev *iter;
+
+ for (iter = intel_devices; iter != NULL; iter = iter->next)
+ if ((iter->dev_id == device_id) && strstr(iter->path, path))
+ return iter;
+ return NULL;
+}
+
static int devpath_to_ll(const char *dev_path, const char *entry, unsigned long long *val)
{
char path[strlen(dev_path) + strlen(entry) + 2];