Merge series "ASoC: qcom: Minor code cleanups for lpass-cpu" from Stephen Boyd <swboyd@chromium.org>:
Here's some minor code cleanups for the lpass-cpu driver. I noticed that
it casts away const from the driver data from DT. That's not great but
fixing it is a little more involved. I'll get to it later. There's also
some questionable clk_get() usage that should probably be
clk_get_optional(). For now this should help a little.
Cc: V Sujith Kumar Reddy <vsujithk@codeaurora.org>
Cc: Srinivasa Rao <srivasam@codeaurora.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Cheng-Yi Chiang <cychiang@chromium.org>
Stephen Boyd (4):
ASoC: qcom: Remove useless debug print
ASoC: qcom: Add some names to regmap configs
ASoC: qcom: Stop casting away __iomem for error pointers
ASoC: qcom: Remove duplicate error messages on ioremap
sound/soc/qcom/lpass-cpu.c | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
base-commit: 5c8fe583cc
--
https://chromeos.dev
This commit is contained in:
commit
42dc604051
|
@ -458,6 +458,7 @@ static bool lpass_cpu_regmap_volatile(struct device *dev, unsigned int reg)
|
|||
}
|
||||
|
||||
static struct regmap_config lpass_cpu_regmap_config = {
|
||||
.name = "lpass_cpu",
|
||||
.reg_bits = 32,
|
||||
.reg_stride = 4,
|
||||
.val_bits = 32,
|
||||
|
@ -658,6 +659,7 @@ static bool lpass_hdmi_regmap_volatile(struct device *dev, unsigned int reg)
|
|||
}
|
||||
|
||||
static struct regmap_config lpass_hdmi_regmap_config = {
|
||||
.name = "lpass_hdmi",
|
||||
.reg_bits = 32,
|
||||
.reg_stride = 4,
|
||||
.val_bits = 32,
|
||||
|
@ -726,7 +728,6 @@ static void of_lpass_cpu_parse_dai_data(struct device *dev,
|
|||
}
|
||||
if (id == LPASS_DP_RX) {
|
||||
data->hdmi_port_enable = 1;
|
||||
dev_err(dev, "HDMI Port is enabled: %d\n", id);
|
||||
} else {
|
||||
data->mi2s_playback_sd_mode[id] =
|
||||
of_lpass_cpu_parse_sd_lines(dev, node,
|
||||
|
@ -771,11 +772,8 @@ int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev)
|
|||
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "lpass-lpaif");
|
||||
|
||||
drvdata->lpaif = devm_ioremap_resource(dev, res);
|
||||
if (IS_ERR((void const __force *)drvdata->lpaif)) {
|
||||
dev_err(dev, "error mapping reg resource: %ld\n",
|
||||
PTR_ERR((void const __force *)drvdata->lpaif));
|
||||
return PTR_ERR((void const __force *)drvdata->lpaif);
|
||||
}
|
||||
if (IS_ERR(drvdata->lpaif))
|
||||
return PTR_ERR(drvdata->lpaif);
|
||||
|
||||
lpass_cpu_regmap_config.max_register = LPAIF_WRDMAPER_REG(variant,
|
||||
variant->wrdma_channels +
|
||||
|
@ -793,11 +791,8 @@ int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev)
|
|||
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "lpass-hdmiif");
|
||||
|
||||
drvdata->hdmiif = devm_ioremap_resource(dev, res);
|
||||
if (IS_ERR((void const __force *)drvdata->hdmiif)) {
|
||||
dev_err(dev, "error mapping reg resource: %ld\n",
|
||||
PTR_ERR((void const __force *)drvdata->hdmiif));
|
||||
return PTR_ERR((void const __force *)drvdata->hdmiif);
|
||||
}
|
||||
if (IS_ERR(drvdata->hdmiif))
|
||||
return PTR_ERR(drvdata->hdmiif);
|
||||
|
||||
lpass_hdmi_regmap_config.max_register = LPAIF_HDMI_RDMAPER_REG(variant,
|
||||
variant->hdmi_rdma_channels);
|
||||
|
|
Loading…
Reference in New Issue