]> www.infradead.org Git - users/hch/misc.git/commitdiff
ASoC: codecs: wcd937x: get regmap directly
authorSrinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Tue, 9 Sep 2025 12:19:54 +0000 (13:19 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 18 Sep 2025 21:24:36 +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-14-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wcd937x.c

index 4c040e3862f481e1d2e4355570c3d8f9b47e7f21..421ec7a2d6bdc8e4beed133ef4e3e1909f132804 100644 (file)
@@ -2790,7 +2790,7 @@ static int wcd937x_bind(struct device *dev)
                return -EINVAL;
        }
 
-       wcd937x->regmap = dev_get_regmap(&wcd937x->tx_sdw_dev->dev, NULL);
+       wcd937x->regmap = wcd937x->sdw_priv[AIF1_CAP]->regmap;
        if (!wcd937x->regmap) {
                dev_err(dev, "could not get TX device regmap\n");
                return -EINVAL;