OSDN Git Service

enumeration: Refactor discover sensors code
authorDaniel Baluta <daniel.baluta@intel.com>
Tue, 27 Jan 2015 16:23:57 +0000 (18:23 +0200)
committerGerrit Code Review <gerrit2@irsgerrit001.ir.intel.com>
Fri, 6 Feb 2015 10:14:44 +0000 (10:14 +0000)
commit69c468d5448e07e31e953dd7469b9e2b8eb41d3c
tree0c724c85510dab184de5ba5f37ae79f4528280e3
parent13789af718a8cd0fe92b00a705911408c2b7f99e
enumeration: Refactor discover sensors code

The functions for discovering poll sensors (discover_poll_sensors)
and trigger sensors (discover_trig_sensors) contain duplicate
code. If more sensor types need to be discovered (e.g. event sensors),
this would add even more duplicate code.

Refactor these two functions to minimize code duplication.

Change-Id: I92ac6f8c6a54afbce5a3ffb45d4b011204e8c754
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
enumeration.c