Skip to content

Commit

Permalink
ASoC: Intel: bytcr_rt5651: Get platform data via dev_get_platdata()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
andy-shev authored and broonie committed Oct 11, 2021
1 parent 81a13ac commit 0c465e7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sound/soc/intel/boards/bytcr_rt5651.c
Expand Up @@ -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;
Expand All @@ -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 */
Expand Down

0 comments on commit 0c465e7

Please sign in to comment.