未验证 提交 b0bcbe61 编写于 作者: D Dan Murphy 提交者: Mark Brown

ASoC: tas2770: Fix calling reset in probe

tas2770_reset is called during i2c probe. The reset calls the
snd_soc_component_write which depends on the tas2770->component being
available. The component pointer is not set until codec_probe so move
the reset to the codec_probe after the pointer is set.

Fixes: 1a476abc ("tas2770: add tas2770 smart PA kernel driver")
Signed-off-by: NDan Murphy <dmurphy@ti.com>
Link: https://lore.kernel.org/r/20200918190548.12598-1-dmurphy@ti.comSigned-off-by: NMark Brown <broonie@kernel.org>
上级 5f2df2a4
......@@ -575,6 +575,8 @@ static int tas2770_codec_probe(struct snd_soc_component *component)
tas2770->component = component;
tas2770_reset(tas2770);
return 0;
}
......@@ -771,8 +773,6 @@ static int tas2770_i2c_probe(struct i2c_client *client,
tas2770->channel_size = 0;
tas2770->slot_width = 0;
tas2770_reset(tas2770);
result = tas2770_register_codec(tas2770);
if (result)
dev_err(tas2770->dev, "Register codec failed.\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册