All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/4] ASoC: Intel: bytcr_rt5651: Get platform data via dev_get_platdata()
@ 2021-10-06 15:04 ` Andy Shevchenko
  0 siblings, 0 replies; 24+ messages in thread
From: Andy Shevchenko @ 2021-10-06 15:04 UTC (permalink / raw)
  To: Mark Brown, alsa-devel, linux-kernel
  Cc: Cezary Rojewski, Pierre-Louis Bossart, Liam Girdwood, Jie Yang,
	Jaroslav Kysela, Takashi Iwai, Andy Shevchenko

Access to platform data via dev_get_platdata() getter to make code cleaner.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 sound/soc/intel/boards/bytcr_rt5651.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index 00c347b52863..2335cca17cc8 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -894,9 +894,10 @@ struct acpi_chan_package {   /* ACPICA seems to require 64 bit integers */
 
 static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
 {
+	struct device *dev = &pdev->dev;
 	static const char * const mic_name[] = { "dmic", "in1", "in2", "in12" };
+	struct snd_soc_acpi_mach *mach = dev_get_platdata(dev);
 	struct byt_rt5651_private *priv;
-	struct snd_soc_acpi_mach *mach;
 	const char *platform_name;
 	struct acpi_device *adev;
 	struct device *codec_dev;
@@ -912,8 +913,6 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
 
 	/* register the soc card */
 	byt_rt5651_card.dev = &pdev->dev;
-
-	mach = byt_rt5651_card.dev->platform_data;
 	snd_soc_card_set_drvdata(&byt_rt5651_card, priv);
 
 	/* fix index of codec dai */
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2021-10-06 17:22 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-06 15:04 [PATCH v1 1/4] ASoC: Intel: bytcr_rt5651: Get platform data via dev_get_platdata() Andy Shevchenko
2021-10-06 15:04 ` Andy Shevchenko
2021-10-06 15:04 ` [PATCH v1 2/4] ASoC: Intel: bytcr_rt5651: Use temporary variable for struct device Andy Shevchenko
2021-10-06 15:04   ` Andy Shevchenko
2021-10-06 15:04 ` [PATCH v1 3/4] ASoC: Intel: bytcr_rt5651: use devm_clk_get_optional() for mclk Andy Shevchenko
2021-10-06 15:04   ` Andy Shevchenko
2021-10-06 15:51   ` Pierre-Louis Bossart
2021-10-06 15:51     ` Pierre-Louis Bossart
2021-10-06 16:23     ` Andy Shevchenko
2021-10-06 16:23       ` Andy Shevchenko
2021-10-06 16:37       ` Pierre-Louis Bossart
2021-10-06 16:37         ` Pierre-Louis Bossart
2021-10-06 16:50         ` Andy Shevchenko
2021-10-06 16:50           ` Andy Shevchenko
2021-10-06 17:06           ` Mark Brown
2021-10-06 17:06             ` Mark Brown
2021-10-06 17:11         ` Hans de Goede
2021-10-06 17:11           ` Hans de Goede
2021-10-06 17:18           ` Pierre-Louis Bossart
2021-10-06 17:18             ` Pierre-Louis Bossart
2021-10-06 17:21           ` Andy Shevchenko
2021-10-06 17:21             ` Andy Shevchenko
2021-10-06 15:04 ` [PATCH v1 4/4] ASoC: Intel: bytcr_rt5651: Utilize dev_err_probe() to avoid log saturation Andy Shevchenko
2021-10-06 15:04   ` Andy Shevchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.