diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2021-10-07 20:02:47 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-10-11 14:58:51 +0100 |
commit | 0c465e7a8ea26f4ad52dd9548f22afdaf6e039a5 (patch) | |
tree | 643f84512c9a0e28906a308e0d4d31e1ed3225af /sound/soc/intel | |
parent | 81a13ac7e3e490a76fafb7f62d1dd751ae94ca11 (diff) | |
download | linux-0c465e7a8ea26f4ad52dd9548f22afdaf6e039a5.tar.bz2 |
ASoC: Intel: bytcr_rt5651: Get platform data via dev_get_platdata()
Access to platform data via dev_get_platdata() getter to make code cleaner.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211007170250.27997-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel')
-rw-r--r-- | sound/soc/intel/boards/bytcr_rt5651.c | 5 |
1 files 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 */ |