]> www.infradead.org Git - users/hch/misc.git/commitdiff
ASoC: codecs: wcd938x: get regmap directly
authorSrinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Tue, 9 Sep 2025 12:19:53 +0000 (13:19 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 18 Sep 2025 21:24:35 +0000 (22:24 +0100)
Remove usage of dev_get_regmap, as this its more efficient to directly
reference the pointer.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20250909121954.225833-13-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wcd938x.c

index e495f98972f1a230042fdd6dc81e991cf3138008..e1a4783b984c176b8e955342122e5a8c75b23464 100644 (file)
@@ -3389,7 +3389,7 @@ static int wcd938x_bind(struct device *dev)
                goto err_remove_tx_link;
        }
 
-       wcd938x->regmap = dev_get_regmap(&wcd938x->tx_sdw_dev->dev, NULL);
+       wcd938x->regmap = wcd938x->sdw_priv[AIF1_CAP]->regmap;
        if (!wcd938x->regmap) {
                dev_err(dev, "could not get TX device regmap\n");
                ret = -EINVAL;