mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
ASoC: sdw_utils: tidyup asoc_sdw_parse_sdw_endpoints()
We can avoid to use *card. Tidyup it. Current code makes old style / new style conversion difficult. To make future conversions easier to understand, this patch clean up the code a little. but no functional change. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/87ik75etxw.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
@@ -182,7 +182,8 @@ struct asoc_sdw_dailink *asoc_sdw_find_dailink(struct asoc_sdw_dailink *dailinks
|
||||
const struct snd_soc_acpi_endpoint *new);
|
||||
int asoc_sdw_get_dai_type(u32 type);
|
||||
|
||||
int asoc_sdw_parse_sdw_endpoints(struct snd_soc_card *card,
|
||||
int asoc_sdw_parse_sdw_endpoints(struct device *dev,
|
||||
struct asoc_sdw_mc_private *ctx,
|
||||
struct snd_soc_aux_dev *soc_aux,
|
||||
struct asoc_sdw_dailink *soc_dais,
|
||||
struct asoc_sdw_endpoint *soc_ends,
|
||||
|
||||
@@ -432,7 +432,7 @@ static int soc_card_dai_links_create(struct snd_soc_card *card)
|
||||
if (!soc_aux)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = asoc_sdw_parse_sdw_endpoints(card, soc_aux, soc_dais, soc_ends, &num_confs);
|
||||
ret = asoc_sdw_parse_sdw_endpoints(dev, ctx, soc_aux, soc_dais, soc_ends, &num_confs);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
||||
@@ -303,7 +303,7 @@ static int sof_card_dai_links_create(struct snd_soc_card *card)
|
||||
if (!sof_aux)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = asoc_sdw_parse_sdw_endpoints(card, sof_aux, sof_dais, sof_ends, &num_devs);
|
||||
ret = asoc_sdw_parse_sdw_endpoints(dev, ctx, sof_aux, sof_dais, sof_ends, &num_devs);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
||||
@@ -1285,7 +1285,7 @@ static int sof_card_dai_links_create(struct snd_soc_card *card)
|
||||
goto err_dai;
|
||||
}
|
||||
|
||||
ret = asoc_sdw_parse_sdw_endpoints(card, sof_aux, sof_dais, sof_ends, &num_confs);
|
||||
ret = asoc_sdw_parse_sdw_endpoints(dev, ctx, sof_aux, sof_dais, sof_ends, &num_confs);
|
||||
if (ret < 0)
|
||||
goto err_end;
|
||||
|
||||
|
||||
@@ -1976,14 +1976,13 @@ put_device:
|
||||
return ret;
|
||||
}
|
||||
|
||||
int asoc_sdw_parse_sdw_endpoints(struct snd_soc_card *card,
|
||||
int asoc_sdw_parse_sdw_endpoints(struct device *dev,
|
||||
struct asoc_sdw_mc_private *ctx,
|
||||
struct snd_soc_aux_dev *soc_aux,
|
||||
struct asoc_sdw_dailink *soc_dais,
|
||||
struct asoc_sdw_endpoint *soc_ends,
|
||||
int *num_devs)
|
||||
{
|
||||
struct device *dev = card->dev;
|
||||
struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card);
|
||||
struct snd_soc_acpi_mach *mach = dev_get_platdata(dev);
|
||||
struct snd_soc_acpi_mach_params *mach_params = &mach->mach_params;
|
||||
const struct snd_soc_acpi_link_adr *adr_link;
|
||||
|
||||
Reference in New Issue
Block a user