mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 08:44:21 +08:00
ASoC: fsl-asoc-card: force cast the asrc_format type
[ Upstream commit6c7b077dad
] Fix sparse warning: sound/soc/fsl/fsl-asoc-card.c:833:45: sparse: warning: incorrect type in argument 3 (different base types) sound/soc/fsl/fsl-asoc-card.c:833:45: sparse: expected unsigned int [usertype] *out_value sound/soc/fsl/fsl-asoc-card.c:833:45: sparse: got restricted snd_pcm_format_t * Fixes:859e364302
("ASoC: fsl-asoc-card: Support new property fsl, asrc-format") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1658399393-28777-4-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
10961cbaea
commit
78263868db
@ -540,6 +540,7 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
|
|||||||
struct device *codec_dev = NULL;
|
struct device *codec_dev = NULL;
|
||||||
const char *codec_dai_name;
|
const char *codec_dai_name;
|
||||||
const char *codec_dev_name;
|
const char *codec_dev_name;
|
||||||
|
u32 asrc_fmt = 0;
|
||||||
u32 width;
|
u32 width;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -817,8 +818,8 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
|
|||||||
goto asrc_fail;
|
goto asrc_fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = of_property_read_u32(asrc_np, "fsl,asrc-format",
|
ret = of_property_read_u32(asrc_np, "fsl,asrc-format", &asrc_fmt);
|
||||||
&priv->asrc_format);
|
priv->asrc_format = (__force snd_pcm_format_t)asrc_fmt;
|
||||||
if (ret) {
|
if (ret) {
|
||||||
/* Fallback to old binding; translate to asrc_format */
|
/* Fallback to old binding; translate to asrc_format */
|
||||||
ret = of_property_read_u32(asrc_np, "fsl,asrc-width",
|
ret = of_property_read_u32(asrc_np, "fsl,asrc-width",
|
||||||
|
Loading…
Reference in New Issue
Block a user