summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Marko2025-12-01 14:02:04 +0000
committerRobert Marko2025-12-01 14:05:56 +0000
commit5bdf1b8d9c6354228655b6ced0d78c238e943d27 (patch)
tree42975c87beda922f8b83f57a5bce4eb2274cebd1
parent401c0a03f13de816e1a5998e69bff82057b489d6 (diff)
downloadopenwrt-5bdf1b8d9c6354228655b6ced0d78c238e943d27.tar.gz
qualcommax: fix CPR of_property_present conversion
CPR conversion to of_property_present is broken in multiple places, either by leaving the comma after now the last argument or by attempting to replace an instance that actually uses the returned length. So, lets fix these in order for qualcommax to compile again. Fixes: c9e7f32c4c09 ("treewide: use of_property_present") Signed-off-by: Robert Marko <robimarko@gmail.com>
-rw-r--r--target/linux/qualcommax/patches-6.12/0901-regulator-add-Qualcomm-CPR-regulators.patch18
1 files changed, 8 insertions, 10 deletions
diff --git a/target/linux/qualcommax/patches-6.12/0901-regulator-add-Qualcomm-CPR-regulators.patch b/target/linux/qualcommax/patches-6.12/0901-regulator-add-Qualcomm-CPR-regulators.patch
index 4484016a7d..a6c5c4b167 100644
--- a/target/linux/qualcommax/patches-6.12/0901-regulator-add-Qualcomm-CPR-regulators.patch
+++ b/target/linux/qualcommax/patches-6.12/0901-regulator-add-Qualcomm-CPR-regulators.patch
@@ -7102,7 +7102,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
+#endif /* __REGULATOR_CPR_REGULATOR_H__ */
--- /dev/null
+++ b/drivers/regulator/cpr3-util.c
-@@ -0,0 +1,2760 @@
+@@ -0,0 +1,2758 @@
+/*
+ * Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
+ *
@@ -8009,8 +8009,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
+ }
+ vreg->aging_corner -= CPR3_CORNER_OFFSET;
+
-+ if (of_property_present(vreg->of_node, "qcom,cpr-aging-derate",
-+ )) {
++ if (of_property_present(vreg->of_node, "qcom,cpr-aging-derate")) {
+ rc = cpr3_parse_corner_array_property(vreg,
+ "qcom,cpr-aging-derate", 1, temp);
+ if (rc)
@@ -8152,8 +8151,8 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
+ int i, cpu;
+ int len = 0;
+
-+ if (!of_property_present(ctrl->dev->of_node, "qcom,cpr-interrupt-affinity",
-+ &len)) {
++ if (!of_find_property(ctrl->dev->of_node, "qcom,cpr-interrupt-affinity",
++ &len)) {
+ /* No IRQ affinity required */
+ return 0;
+ }
@@ -8660,7 +8659,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
+ const char prop_name_v2[] = "qcom,cpr-parts-voltage-v2";
+
+ soc_version_major = read_ipq_soc_version_major();
-+ BUG_ON(soc_version_major <= 0);
++ BUG_ON(soc_version_major <= 0);
+
+ if (of_property_read_u32(vreg->of_node, "qcom,cpr-part-types",
+ &vreg->part_type_supported))
@@ -8835,10 +8834,10 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
+
+ if (!of_property_present(vreg->of_node, prop_str)) {
+ /* No adjustment required. */
-+ cpr3_err(vreg, "Missing %s required for %s\n",
++ cpr3_err(vreg, "Missing %s required for %s\n",
+ prop_str, req_prop_str);
+ return -EINVAL;
-+ }
++ }
+
+ rc = of_property_read_u32(vreg->of_node, prop_str, &temp);
+ if (rc) {
@@ -9357,8 +9356,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
+
+ if (of_property_present(node, use_corner_band ?
+ "qcom,corner-band-allow-core-count-adjustment"
-+ : "qcom,corner-allow-core-count-adjustment",
-+ )) {
++ : "qcom,corner-allow-core-count-adjustment")) {
+ rc = of_property_read_u32(node, "qcom,max-core-count",
+ &vreg->max_core_count);
+ if (rc) {