hwid: Use sorted list instead of set to derive encoded field index.

We now have boards that have multiple same components. We should use sorted
list instead of set to identify multiple occurrences of a component.

TEST=unit tests

Change-Id: I8251b0ae893cad5663ea200e853c843d29b43ad9
Signed-off-by: Ricky Liang <jcliang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/273848
Reviewed-by: Chun-ta Lin <itspeter@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
1 file changed