Commit 42432196 authored by Guennadi Liakhovetski's avatar Guennadi Liakhovetski Committed by Mark Brown

ASoC: Intel: (cosmetic) simplify structure member access

Fix a clumsy structure member dereference in all machine drivers.
Signed-off-by: default avatarGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200312194859.4051-8-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent ca841843
...@@ -298,7 +298,7 @@ static int bdw_rt5650_probe(struct platform_device *pdev) ...@@ -298,7 +298,7 @@ static int bdw_rt5650_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
/* override plaform name, if required */ /* override plaform name, if required */
mach = (&pdev->dev)->platform_data; mach = pdev->dev.platform_data;
ret = snd_soc_fixup_dai_links_platform_name(&bdw_rt5650_card, ret = snd_soc_fixup_dai_links_platform_name(&bdw_rt5650_card,
mach->mach_params.platform); mach->mach_params.platform);
......
...@@ -412,7 +412,7 @@ static int bdw_rt5677_probe(struct platform_device *pdev) ...@@ -412,7 +412,7 @@ static int bdw_rt5677_probe(struct platform_device *pdev)
} }
/* override plaform name, if required */ /* override plaform name, if required */
mach = (&pdev->dev)->platform_data; mach = pdev->dev.platform_data;
ret = snd_soc_fixup_dai_links_platform_name(&bdw_rt5677_card, ret = snd_soc_fixup_dai_links_platform_name(&bdw_rt5677_card,
mach->mach_params.platform); mach->mach_params.platform);
if (ret) if (ret)
......
...@@ -283,7 +283,7 @@ static int broadwell_audio_probe(struct platform_device *pdev) ...@@ -283,7 +283,7 @@ static int broadwell_audio_probe(struct platform_device *pdev)
broadwell_rt286.dev = &pdev->dev; broadwell_rt286.dev = &pdev->dev;
/* override plaform name, if required */ /* override plaform name, if required */
mach = (&pdev->dev)->platform_data; mach = pdev->dev.platform_data;
ret = snd_soc_fixup_dai_links_platform_name(&broadwell_rt286, ret = snd_soc_fixup_dai_links_platform_name(&broadwell_rt286,
mach->mach_params.platform); mach->mach_params.platform);
if (ret) if (ret)
......
...@@ -721,7 +721,7 @@ static int broxton_audio_probe(struct platform_device *pdev) ...@@ -721,7 +721,7 @@ static int broxton_audio_probe(struct platform_device *pdev)
} }
/* override plaform name, if required */ /* override plaform name, if required */
mach = (&pdev->dev)->platform_data; mach = pdev->dev.platform_data;
platform_name = mach->mach_params.platform; platform_name = mach->mach_params.platform;
ret = snd_soc_fixup_dai_links_platform_name(&broxton_audio_card, ret = snd_soc_fixup_dai_links_platform_name(&broxton_audio_card,
......
...@@ -627,7 +627,7 @@ static int broxton_audio_probe(struct platform_device *pdev) ...@@ -627,7 +627,7 @@ static int broxton_audio_probe(struct platform_device *pdev)
snd_soc_card_set_drvdata(card, ctx); snd_soc_card_set_drvdata(card, ctx);
/* override plaform name, if required */ /* override plaform name, if required */
mach = (&pdev->dev)->platform_data; mach = pdev->dev.platform_data;
platform_name = mach->mach_params.platform; platform_name = mach->mach_params.platform;
ret = snd_soc_fixup_dai_links_platform_name(card, ret = snd_soc_fixup_dai_links_platform_name(card,
......
...@@ -231,7 +231,7 @@ static int bytcht_da7213_probe(struct platform_device *pdev) ...@@ -231,7 +231,7 @@ static int bytcht_da7213_probe(struct platform_device *pdev)
int ret_val = 0; int ret_val = 0;
int i; int i;
mach = (&pdev->dev)->platform_data; mach = pdev->dev.platform_data;
card = &bytcht_da7213_card; card = &bytcht_da7213_card;
card->dev = &pdev->dev; card->dev = &pdev->dev;
......
...@@ -553,7 +553,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev) ...@@ -553,7 +553,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
/* override plaform name, if required */ /* override plaform name, if required */
snd_soc_card_cht.dev = &pdev->dev; snd_soc_card_cht.dev = &pdev->dev;
mach = (&pdev->dev)->platform_data; mach = pdev->dev.platform_data;
platform_name = mach->mach_params.platform; platform_name = mach->mach_params.platform;
ret_val = snd_soc_fixup_dai_links_platform_name(&snd_soc_card_cht, ret_val = snd_soc_fixup_dai_links_platform_name(&snd_soc_card_cht,
......
...@@ -259,7 +259,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev) ...@@ -259,7 +259,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
/* override plaform name, if required */ /* override plaform name, if required */
snd_soc_card_cht.dev = &pdev->dev; snd_soc_card_cht.dev = &pdev->dev;
mach = (&pdev->dev)->platform_data; mach = pdev->dev.platform_data;
platform_name = mach->mach_params.platform; platform_name = mach->mach_params.platform;
ret_val = snd_soc_fixup_dai_links_platform_name(&snd_soc_card_cht, ret_val = snd_soc_fixup_dai_links_platform_name(&snd_soc_card_cht,
......
...@@ -539,7 +539,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev) ...@@ -539,7 +539,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
if (!drv) if (!drv)
return -ENOMEM; return -ENOMEM;
mach = (&pdev->dev)->platform_data; mach = pdev->dev.platform_data;
for (i = 0; i < ARRAY_SIZE(snd_soc_cards); i++) { for (i = 0; i < ARRAY_SIZE(snd_soc_cards); i++) {
if (acpi_dev_found(snd_soc_cards[i].codec_id) && if (acpi_dev_found(snd_soc_cards[i].codec_id) &&
......
...@@ -451,7 +451,7 @@ static int snd_cml_rt1011_probe(struct platform_device *pdev) ...@@ -451,7 +451,7 @@ static int snd_cml_rt1011_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
INIT_LIST_HEAD(&ctx->hdmi_pcm_list); INIT_LIST_HEAD(&ctx->hdmi_pcm_list);
mach = (&pdev->dev)->platform_data; mach = pdev->dev.platform_data;
snd_soc_card_cml.dev = &pdev->dev; snd_soc_card_cml.dev = &pdev->dev;
platform_name = mach->mach_params.platform; platform_name = mach->mach_params.platform;
......
...@@ -604,7 +604,7 @@ static int geminilake_audio_probe(struct platform_device *pdev) ...@@ -604,7 +604,7 @@ static int geminilake_audio_probe(struct platform_device *pdev)
snd_soc_card_set_drvdata(card, ctx); snd_soc_card_set_drvdata(card, ctx);
/* override plaform name, if required */ /* override plaform name, if required */
mach = (&pdev->dev)->platform_data; mach = pdev->dev.platform_data;
platform_name = mach->mach_params.platform; platform_name = mach->mach_params.platform;
ret = snd_soc_fixup_dai_links_platform_name(card, platform_name); ret = snd_soc_fixup_dai_links_platform_name(card, platform_name);
......
...@@ -193,7 +193,7 @@ static int haswell_audio_probe(struct platform_device *pdev) ...@@ -193,7 +193,7 @@ static int haswell_audio_probe(struct platform_device *pdev)
haswell_rt5640.dev = &pdev->dev; haswell_rt5640.dev = &pdev->dev;
/* override plaform name, if required */ /* override plaform name, if required */
mach = (&pdev->dev)->platform_data; mach = pdev->dev.platform_data;
ret = snd_soc_fixup_dai_links_platform_name(&haswell_rt5640, ret = snd_soc_fixup_dai_links_platform_name(&haswell_rt5640,
mach->mach_params.platform); mach->mach_params.platform);
if (ret) if (ret)
......
...@@ -962,7 +962,7 @@ static int kabylake_audio_probe(struct platform_device *pdev) ...@@ -962,7 +962,7 @@ static int kabylake_audio_probe(struct platform_device *pdev)
kabylake_audio_card->dev = &pdev->dev; kabylake_audio_card->dev = &pdev->dev;
snd_soc_card_set_drvdata(kabylake_audio_card, ctx); snd_soc_card_set_drvdata(kabylake_audio_card, ctx);
mach = (&pdev->dev)->platform_data; mach = pdev->dev.platform_data;
if (mach) if (mach)
dmic_constraints = mach->mach_params.dmic_num == 2 ? dmic_constraints = mach->mach_params.dmic_num == 2 ?
&constraints_dmic_2ch : &constraints_dmic_channels; &constraints_dmic_2ch : &constraints_dmic_channels;
......
...@@ -772,7 +772,7 @@ static int kabylake_audio_probe(struct platform_device *pdev) ...@@ -772,7 +772,7 @@ static int kabylake_audio_probe(struct platform_device *pdev)
kabylake_audio_card.dev = &pdev->dev; kabylake_audio_card.dev = &pdev->dev;
snd_soc_card_set_drvdata(&kabylake_audio_card, ctx); snd_soc_card_set_drvdata(&kabylake_audio_card, ctx);
mach = (&pdev->dev)->platform_data; mach = pdev->dev.platform_data;
if (mach) if (mach)
dmic_constraints = mach->mach_params.dmic_num == 2 ? dmic_constraints = mach->mach_params.dmic_num == 2 ?
&constraints_dmic_2ch : &constraints_dmic_channels; &constraints_dmic_2ch : &constraints_dmic_channels;
......
...@@ -182,7 +182,7 @@ static int skl_hda_audio_probe(struct platform_device *pdev) ...@@ -182,7 +182,7 @@ static int skl_hda_audio_probe(struct platform_device *pdev)
INIT_LIST_HEAD(&ctx->hdmi_pcm_list); INIT_LIST_HEAD(&ctx->hdmi_pcm_list);
mach = (&pdev->dev)->platform_data; mach = pdev->dev.platform_data;
if (!mach) if (!mach)
return -EINVAL; return -EINVAL;
......
...@@ -660,7 +660,7 @@ static int skylake_audio_probe(struct platform_device *pdev) ...@@ -660,7 +660,7 @@ static int skylake_audio_probe(struct platform_device *pdev)
skylake_audio_card.dev = &pdev->dev; skylake_audio_card.dev = &pdev->dev;
snd_soc_card_set_drvdata(&skylake_audio_card, ctx); snd_soc_card_set_drvdata(&skylake_audio_card, ctx);
mach = (&pdev->dev)->platform_data; mach = pdev->dev.platform_data;
if (mach) if (mach)
dmic_constraints = mach->mach_params.dmic_num == 2 ? dmic_constraints = mach->mach_params.dmic_num == 2 ?
&constraints_dmic_2ch : &constraints_dmic_channels; &constraints_dmic_2ch : &constraints_dmic_channels;
......
...@@ -703,7 +703,7 @@ static int skylake_audio_probe(struct platform_device *pdev) ...@@ -703,7 +703,7 @@ static int skylake_audio_probe(struct platform_device *pdev)
skylake_audio_card.dev = &pdev->dev; skylake_audio_card.dev = &pdev->dev;
snd_soc_card_set_drvdata(&skylake_audio_card, ctx); snd_soc_card_set_drvdata(&skylake_audio_card, ctx);
mach = (&pdev->dev)->platform_data; mach = pdev->dev.platform_data;
if (mach) if (mach)
dmic_constraints = mach->mach_params.dmic_num == 2 ? dmic_constraints = mach->mach_params.dmic_num == 2 ?
&constraints_dmic_2ch : &constraints_dmic_channels; &constraints_dmic_2ch : &constraints_dmic_channels;
......
...@@ -335,7 +335,7 @@ static int audio_probe(struct platform_device *pdev) ...@@ -335,7 +335,7 @@ static int audio_probe(struct platform_device *pdev)
card = (struct snd_soc_card *)pdev->id_entry->driver_data; card = (struct snd_soc_card *)pdev->id_entry->driver_data;
card->dev = &pdev->dev; card->dev = &pdev->dev;
mach = (&pdev->dev)->platform_data; mach = pdev->dev.platform_data;
ret = snd_soc_fixup_dai_links_platform_name(card, ret = snd_soc_fixup_dai_links_platform_name(card,
mach->mach_params.platform); mach->mach_params.platform);
if (ret) if (ret)
......
...@@ -604,7 +604,7 @@ static int sof_audio_probe(struct platform_device *pdev) ...@@ -604,7 +604,7 @@ static int sof_audio_probe(struct platform_device *pdev)
dmi_check_system(sof_rt5682_quirk_table); dmi_check_system(sof_rt5682_quirk_table);
mach = (&pdev->dev)->platform_data; mach = pdev->dev.platform_data;
/* A speaker amp might not be present when the quirk claims one is. /* A speaker amp might not be present when the quirk claims one is.
* Detect this via whether the machine driver match includes quirk_data. * Detect this via whether the machine driver match includes quirk_data.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment