]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: codecs: wcd93xx-sdw: fix of_property_read_bool() warnings
authorJohan Hovold <johan+linaro@kernel.org>
Mon, 10 Feb 2025 13:21:28 +0000 (14:21 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 10 Feb 2025 13:42:11 +0000 (13:42 +0000)
Using of_property_read_bool() for non-boolean properties has been
deprecated in favour of of_property_present() and since commit
c141ecc3cecd ("of: Warn when of_property_read_bool() is used on
non-boolean properties") this also generates a warning:

OF: /soc@0/soundwire@3330000/wcd9380-tx@0,3: Read of boolean property 'qcom,tx-port-mapping' with a value.

Switch to using of_property_present() to look for "qcom,tx-port-mapping"
properties.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://patch.msgid.link/20250210132128.7734-1-johan+linaro@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wcd937x-sdw.c
sound/soc/codecs/wcd938x-sdw.c
sound/soc/codecs/wcd939x-sdw.c

index 1fbff313b965625c64947c47b3b6b66dedc058e8..4891fa0c963fb7ae58547194f1095fffe61ac878 100644 (file)
@@ -1028,7 +1028,7 @@ static int wcd9370_probe(struct sdw_slave *pdev,
                return -ENOMEM;
 
        /* Port map index starts at 0, however the data port for this codec start at index 1 */
-       if (of_property_read_bool(dev->of_node, "qcom,tx-port-mapping")) {
+       if (of_property_present(dev->of_node, "qcom,tx-port-mapping")) {
                wcd->is_tx = true;
                ret = of_property_read_u32_array(dev->of_node, "qcom,tx-port-mapping",
                                                 &pdev->m_port_map[1],
index 7da8a10bd0a93281822a6d315ddff06cc9c7894c..4e2ae542cee39b75da11f934378c961cbad8e4a5 100644 (file)
@@ -1229,7 +1229,7 @@ static int wcd9380_probe(struct sdw_slave *pdev,
         * Port map index starts with 0, however the data port for this codec
         * are from index 1
         */
-       if (of_property_read_bool(dev->of_node, "qcom,tx-port-mapping")) {
+       if (of_property_present(dev->of_node, "qcom,tx-port-mapping")) {
                wcd->is_tx = true;
                ret = of_property_read_u32_array(dev->of_node, "qcom,tx-port-mapping",
                                                 &pdev->m_port_map[1],
index fca95777a75af930828e8b31575d6198c47d4639..36868fad3e8b0fd71763153cb84c649354b18ec4 100644 (file)
@@ -1429,7 +1429,7 @@ static int wcd9390_probe(struct sdw_slave *pdev, const struct sdw_device_id *id)
         * Port map index starts with 0, however the data port for this codec
         * are from index 1
         */
-       if (of_property_read_bool(dev->of_node, "qcom,tx-port-mapping")) {
+       if (of_property_present(dev->of_node, "qcom,tx-port-mapping")) {
                wcd->is_tx = true;
                ret = of_property_read_u32_array(dev->of_node,
                                                 "qcom,tx-port-mapping",