mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-01 01:14:19 -04:00
ASoC: Intel: (cosmetic) simplify structure member access
Fix a clumsy structure member dereference in all machine drivers. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200312194859.4051-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
ca841843a3
commit
42432196cf
@@ -298,7 +298,7 @@ static int bdw_rt5650_probe(struct platform_device *pdev)
|
||||
return -ENOMEM;
|
||||
|
||||
/* 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,
|
||||
mach->mach_params.platform);
|
||||
|
||||
|
||||
@@ -412,7 +412,7 @@ static int bdw_rt5677_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
/* 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,
|
||||
mach->mach_params.platform);
|
||||
if (ret)
|
||||
|
||||
@@ -283,7 +283,7 @@ static int broadwell_audio_probe(struct platform_device *pdev)
|
||||
broadwell_rt286.dev = &pdev->dev;
|
||||
|
||||
/* 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,
|
||||
mach->mach_params.platform);
|
||||
if (ret)
|
||||
|
||||
@@ -721,7 +721,7 @@ static int broxton_audio_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
/* override plaform name, if required */
|
||||
mach = (&pdev->dev)->platform_data;
|
||||
mach = pdev->dev.platform_data;
|
||||
platform_name = mach->mach_params.platform;
|
||||
|
||||
ret = snd_soc_fixup_dai_links_platform_name(&broxton_audio_card,
|
||||
|
||||
@@ -627,7 +627,7 @@ static int broxton_audio_probe(struct platform_device *pdev)
|
||||
snd_soc_card_set_drvdata(card, ctx);
|
||||
|
||||
/* override plaform name, if required */
|
||||
mach = (&pdev->dev)->platform_data;
|
||||
mach = pdev->dev.platform_data;
|
||||
platform_name = mach->mach_params.platform;
|
||||
|
||||
ret = snd_soc_fixup_dai_links_platform_name(card,
|
||||
|
||||
@@ -231,7 +231,7 @@ static int bytcht_da7213_probe(struct platform_device *pdev)
|
||||
int ret_val = 0;
|
||||
int i;
|
||||
|
||||
mach = (&pdev->dev)->platform_data;
|
||||
mach = pdev->dev.platform_data;
|
||||
card = &bytcht_da7213_card;
|
||||
card->dev = &pdev->dev;
|
||||
|
||||
|
||||
@@ -553,7 +553,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
|
||||
|
||||
/* override plaform name, if required */
|
||||
snd_soc_card_cht.dev = &pdev->dev;
|
||||
mach = (&pdev->dev)->platform_data;
|
||||
mach = pdev->dev.platform_data;
|
||||
platform_name = mach->mach_params.platform;
|
||||
|
||||
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)
|
||||
|
||||
/* override plaform name, if required */
|
||||
snd_soc_card_cht.dev = &pdev->dev;
|
||||
mach = (&pdev->dev)->platform_data;
|
||||
mach = pdev->dev.platform_data;
|
||||
platform_name = mach->mach_params.platform;
|
||||
|
||||
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)
|
||||
if (!drv)
|
||||
return -ENOMEM;
|
||||
|
||||
mach = (&pdev->dev)->platform_data;
|
||||
mach = pdev->dev.platform_data;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(snd_soc_cards); i++) {
|
||||
if (acpi_dev_found(snd_soc_cards[i].codec_id) &&
|
||||
|
||||
@@ -451,7 +451,7 @@ static int snd_cml_rt1011_probe(struct platform_device *pdev)
|
||||
return -ENOMEM;
|
||||
|
||||
INIT_LIST_HEAD(&ctx->hdmi_pcm_list);
|
||||
mach = (&pdev->dev)->platform_data;
|
||||
mach = pdev->dev.platform_data;
|
||||
snd_soc_card_cml.dev = &pdev->dev;
|
||||
platform_name = mach->mach_params.platform;
|
||||
|
||||
|
||||
@@ -604,7 +604,7 @@ static int geminilake_audio_probe(struct platform_device *pdev)
|
||||
snd_soc_card_set_drvdata(card, ctx);
|
||||
|
||||
/* override plaform name, if required */
|
||||
mach = (&pdev->dev)->platform_data;
|
||||
mach = pdev->dev.platform_data;
|
||||
platform_name = mach->mach_params.platform;
|
||||
|
||||
ret = snd_soc_fixup_dai_links_platform_name(card, platform_name);
|
||||
|
||||
@@ -193,7 +193,7 @@ static int haswell_audio_probe(struct platform_device *pdev)
|
||||
haswell_rt5640.dev = &pdev->dev;
|
||||
|
||||
/* 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,
|
||||
mach->mach_params.platform);
|
||||
if (ret)
|
||||
|
||||
@@ -962,7 +962,7 @@ static int kabylake_audio_probe(struct platform_device *pdev)
|
||||
kabylake_audio_card->dev = &pdev->dev;
|
||||
snd_soc_card_set_drvdata(kabylake_audio_card, ctx);
|
||||
|
||||
mach = (&pdev->dev)->platform_data;
|
||||
mach = pdev->dev.platform_data;
|
||||
if (mach)
|
||||
dmic_constraints = mach->mach_params.dmic_num == 2 ?
|
||||
&constraints_dmic_2ch : &constraints_dmic_channels;
|
||||
|
||||
@@ -772,7 +772,7 @@ static int kabylake_audio_probe(struct platform_device *pdev)
|
||||
kabylake_audio_card.dev = &pdev->dev;
|
||||
snd_soc_card_set_drvdata(&kabylake_audio_card, ctx);
|
||||
|
||||
mach = (&pdev->dev)->platform_data;
|
||||
mach = pdev->dev.platform_data;
|
||||
if (mach)
|
||||
dmic_constraints = mach->mach_params.dmic_num == 2 ?
|
||||
&constraints_dmic_2ch : &constraints_dmic_channels;
|
||||
|
||||
@@ -182,7 +182,7 @@ static int skl_hda_audio_probe(struct platform_device *pdev)
|
||||
|
||||
INIT_LIST_HEAD(&ctx->hdmi_pcm_list);
|
||||
|
||||
mach = (&pdev->dev)->platform_data;
|
||||
mach = pdev->dev.platform_data;
|
||||
if (!mach)
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
@@ -660,7 +660,7 @@ static int skylake_audio_probe(struct platform_device *pdev)
|
||||
skylake_audio_card.dev = &pdev->dev;
|
||||
snd_soc_card_set_drvdata(&skylake_audio_card, ctx);
|
||||
|
||||
mach = (&pdev->dev)->platform_data;
|
||||
mach = pdev->dev.platform_data;
|
||||
if (mach)
|
||||
dmic_constraints = mach->mach_params.dmic_num == 2 ?
|
||||
&constraints_dmic_2ch : &constraints_dmic_channels;
|
||||
|
||||
@@ -703,7 +703,7 @@ static int skylake_audio_probe(struct platform_device *pdev)
|
||||
skylake_audio_card.dev = &pdev->dev;
|
||||
snd_soc_card_set_drvdata(&skylake_audio_card, ctx);
|
||||
|
||||
mach = (&pdev->dev)->platform_data;
|
||||
mach = pdev->dev.platform_data;
|
||||
if (mach)
|
||||
dmic_constraints = mach->mach_params.dmic_num == 2 ?
|
||||
&constraints_dmic_2ch : &constraints_dmic_channels;
|
||||
|
||||
@@ -335,7 +335,7 @@ static int audio_probe(struct platform_device *pdev)
|
||||
card = (struct snd_soc_card *)pdev->id_entry->driver_data;
|
||||
card->dev = &pdev->dev;
|
||||
|
||||
mach = (&pdev->dev)->platform_data;
|
||||
mach = pdev->dev.platform_data;
|
||||
ret = snd_soc_fixup_dai_links_platform_name(card,
|
||||
mach->mach_params.platform);
|
||||
if (ret)
|
||||
|
||||
@@ -604,7 +604,7 @@ static int sof_audio_probe(struct platform_device *pdev)
|
||||
|
||||
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.
|
||||
* Detect this via whether the machine driver match includes quirk_data.
|
||||
|
||||
Reference in New Issue
Block a user