diff options
author | 2023-07-31 16:42:49 -0500 | |
---|---|---|
committer | 2023-07-31 23:22:35 +0100 | |
commit | 855e69f4ff9d726df4c8c47e7b40934fdb49d9c5 (patch) | |
tree | c19a0e1014aa6154dfcfd5b7ff274d27e8c83c90 /sound/soc/intel | |
parent | ASoC: intel: sof_sdw: Constify parameter to find_codec_part_info (diff) | |
download | linux-855e69f4ff9d726df4c8c47e7b40934fdb49d9c5.tar.gz linux-855e69f4ff9d726df4c8c47e7b40934fdb49d9c5.tar.bz2 linux-855e69f4ff9d726df4c8c47e7b40934fdb49d9c5.zip |
ASoC: intel: sof_sdw: Minor tidy up of mc_probe
Shuffle things around to group operations a little more, and
consistently use card->dev.
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230731214257.444605-16-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel')
-rw-r--r-- | sound/soc/intel/boards/sof_sdw.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index fc67029b3a64..d4f2711b6f26 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -1964,34 +1964,34 @@ static void mc_dailink_exit_loop(struct snd_soc_card *card) static int mc_probe(struct platform_device *pdev) { struct snd_soc_card *card = &card_sof_sdw; - struct snd_soc_acpi_mach *mach; + struct snd_soc_acpi_mach *mach = dev_get_platdata(&pdev->dev); struct mc_private *ctx; int amp_num = 0, i; int ret; - dev_dbg(&pdev->dev, "Entry\n"); + card->dev = &pdev->dev; + + dev_dbg(card->dev, "Entry\n"); - ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL); + ctx = devm_kzalloc(card->dev, sizeof(*ctx), GFP_KERNEL); if (!ctx) return -ENOMEM; + INIT_LIST_HEAD(&ctx->hdmi_pcm_list); + + snd_soc_card_set_drvdata(card, ctx); + dmi_check_system(sof_sdw_quirk_table); if (quirk_override != -1) { - dev_info(&pdev->dev, "Overriding quirk 0x%lx => 0x%x\n", + dev_info(card->dev, "Overriding quirk 0x%lx => 0x%x\n", sof_sdw_quirk, quirk_override); sof_sdw_quirk = quirk_override; } - log_quirks(&pdev->dev); - - INIT_LIST_HEAD(&ctx->hdmi_pcm_list); - card->dev = &pdev->dev; - snd_soc_card_set_drvdata(card, ctx); + log_quirks(card->dev); - mach = pdev->dev.platform_data; - ret = sof_card_dai_links_create(&pdev->dev, mach, - card); + ret = sof_card_dai_links_create(card->dev, mach, card); if (ret < 0) return ret; @@ -2022,7 +2022,7 @@ static int mc_probe(struct platform_device *pdev) card->long_name = sdw_card_long_name; /* Register the card */ - ret = devm_snd_soc_register_card(&pdev->dev, card); + ret = devm_snd_soc_register_card(card->dev, card); if (ret) { dev_err(card->dev, "snd_soc_register_card failed %d\n", ret); mc_dailink_exit_loop(card); |