瀏覽代碼

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;
 			}
 
-			sys_gain_length = sys_gain_size / (2 * sizeof(u32));
+			sys_gain_length = sys_gain_size / sizeof(u32);
 			ret = of_property_read_u32_array(
 				wsa884x->macro_dev->dev.of_node,
 				"qcom,wsa-system-gains", wsa884x->sys_gains,