Re: [PATCH v2 07/10] ASoC: Intel: (cosmetic) simplify structure member access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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);



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux