aboutsummaryrefslogtreecommitdiffstats
path: root/lib/4a-hal-utilities/4a-hal-utilities-data.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/4a-hal-utilities/4a-hal-utilities-data.c')
-rw-r--r--lib/4a-hal-utilities/4a-hal-utilities-data.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/4a-hal-utilities/4a-hal-utilities-data.c b/lib/4a-hal-utilities/4a-hal-utilities-data.c
index 6d1afd0..ea92b0e 100644
--- a/lib/4a-hal-utilities/4a-hal-utilities-data.c
+++ b/lib/4a-hal-utilities/4a-hal-utilities-data.c
@@ -313,6 +313,26 @@ int HalUtlGetNumberOfProbedDevicesInList(struct cds_list_head *probedDevicesList
return HalUtlGetNumberOfNodesInList(probedDevicesListHead);
}
+int HalUtlGetNumberOfDynamicProbedDevicesInList(struct cds_list_head *probedDevicesListHead)
+{
+ int numberOfDynamicProbedDevicesInList = 0;
+
+ struct InternalHalProbedDevice *currentProbedDevice;
+
+ if(! probedDevicesListHead)
+ return -1;
+
+ if(cds_list_empty(probedDevicesListHead))
+ return 0;
+
+ cds_list_for_each_entry(currentProbedDevice, probedDevicesListHead, node) {
+ if(currentProbedDevice->deviceClass == DYNAMIC_PROBED_DEVICE)
+ numberOfDynamicProbedDevicesInList++;
+ }
+
+ return numberOfDynamicProbedDevicesInList;
+}
+
struct InternalHalProbedDevice *HalUtlSearchProbedDeviceDataById(struct cds_list_head *probedDevicesListHead,
char *uid)
{