Преглед на файлове

asoc: wsa884x: fix device tree parsing issue for sys gain

System gain is miscalculated due to incorrect parsing of
device tree property. Correct the parsing logic of the
system gain device tree property.

Change-Id: I8c9c5198a139a69c2d5d9520a071123261b0581f
Signed-off-by: Phani Kumar Uppalapati <[email protected]>
Phani Kumar Uppalapati преди 1 година
родител
ревизия
7288435e01
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      asoc/codecs/wsa884x/wsa884x.c

+ 1 - 1
asoc/codecs/wsa884x/wsa884x.c

@@ -2249,7 +2249,7 @@ static int wsa884x_swr_probe(struct swr_device *pdev)
 				goto err_mem;
 				goto err_mem;
 			}
 			}
 
 
-			sys_gain_length = sys_gain_size / (2 * sizeof(u32));
+			sys_gain_length = sys_gain_size / sizeof(u32);
 			ret = of_property_read_u32_array(
 			ret = of_property_read_u32_array(
 				wsa884x->macro_dev->dev.of_node,
 				wsa884x->macro_dev->dev.of_node,
 				"qcom,wsa-system-gains", wsa884x->sys_gains,
 				"qcom,wsa-system-gains", wsa884x->sys_gains,