On 2020-03-12 20:48, Pierre-Louis Bossart wrote:
From: Guennadi Liakhovetski <guennadi.liakhovetski@xxxxxxxxxxxxxxx>
Fix a clumsy structure member dereference in all machine drivers.
diff --git a/sound/soc/intel/boards/bdw-rt5650.c b/sound/soc/intel/boards/bdw-rt5650.c
index 1a302436d450..058abf3eec50 100644
--- a/sound/soc/intel/boards/bdw-rt5650.c
+++ b/sound/soc/intel/boards/bdw-rt5650.c
@@ -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);
hmm, how about native getter in device.h:
mach = dev_get_platdata(&pdev->dev);