Elan: fix product id in firmware reporter
Before this commit elan_product_id was always blank in
/run/touch-updater/firmware-versions this commit aims to fix that
by directly using active_product_id when calling report_initial_version
BUG=b:434762438
TEST=Run the script on Galtic360 and verified elan_product_id is filled
Change-Id: If5aa54a0a0844201b7123cffec21df4946e567ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/touch_updater/+/6765763
Reviewed-by: Henry Barnor <hbarnor@chromium.org>
Reviewed-by: Kenneth Albanowski <kenalba@google.com>
Tested-by: Mohammad Gomaa <midomaxgomaa@gmail.com>
Commit-Queue: Mohammad Gomaa <midomaxgomaa@gmail.com>
diff --git a/scripts/chromeos-elan-touch-firmware-update-legacy.sh b/scripts/chromeos-elan-touch-firmware-update-legacy.sh
index cb46240..ab8119a 100755
--- a/scripts/chromeos-elan-touch-firmware-update-legacy.sh
+++ b/scripts/chromeos-elan-touch-firmware-update-legacy.sh
@@ -196,7 +196,7 @@
"${FW_VERSION_SYSFS}" "${touch_device_path}")"
report_initial_version "${touch_device_path}" "Elan" "${active_fw_version}" \
- "\"elan_product_id\": \"$(make_json_safe "${product_id}")\""
+ "\"elan_product_id\": \"$(make_json_safe "${active_product_id}")\""
# Find the FW that the updater is considering flashing on the touch device.
fw_link_path="$(find_fw_link_path "${FW_NAME}.bin" "${active_product_id}")"