From: Mateusz Gorski <mateusz.gorski@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: cezary.rojewski@intel.com,
Mateusz Gorski <mateusz.gorski@linux.intel.com>,
tiwai@suse.com
Subject: [PATCH 1/4] ASoC: Intel: Skylake: Change the order of machine device and platform registration
Date: Tue, 21 Apr 2020 22:25:16 +0200 [thread overview]
Message-ID: <20200421202519.4008-2-mateusz.gorski@linux.intel.com> (raw)
In-Reply-To: <20200421202519.4008-1-mateusz.gorski@linux.intel.com>
Swap the order of machine device and platform device registration.
This change ensures that even if the codec enumeration falls late - during
the driver module or topology reload - i2s_dev field is always ready to
be used.
Follow-up patch uses data from this field to create alternative topology
name based on used machine device.
Signed-off-by: Mateusz Gorski <mateusz.gorski@linux.intel.com>
---
sound/soc/intel/skylake/skl.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c
index 63182bfd7941..8473eb13ea65 100644
--- a/sound/soc/intel/skylake/skl.c
+++ b/sound/soc/intel/skylake/skl.c
@@ -819,16 +819,16 @@ static void skl_probe_work(struct work_struct *work)
/* create codec instances */
skl_codec_create(bus);
- /* register platform dai and controls */
- err = skl_platform_register(bus->dev);
+ err = skl_machine_device_register(skl);
if (err < 0) {
- dev_err(bus->dev, "platform register failed: %d\n", err);
+ dev_err(bus->dev, "machine register failed: %d\n", err);
goto out_err;
}
- err = skl_machine_device_register(skl);
+ /* register platform dai and controls */
+ err = skl_platform_register(bus->dev);
if (err < 0) {
- dev_err(bus->dev, "machine register failed: %d\n", err);
+ dev_err(bus->dev, "platform register failed: %d\n", err);
goto out_err;
}
--
2.17.1
next prev parent reply other threads:[~2020-04-21 20:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-21 20:25 [PATCH 0/4] Add support for different DMIC configurations Mateusz Gorski
2020-04-21 20:25 ` Mateusz Gorski [this message]
2020-04-21 20:49 ` [PATCH 1/4] ASoC: Intel: Skylake: Change the order of machine device and platform registration Pierre-Louis Bossart
2020-04-22 12:03 ` Gorski, Mateusz
2020-04-21 20:25 ` [PATCH 2/4] ASoC: Intel: Skylake: Add alternative topology binary name Mateusz Gorski
2020-04-21 20:25 ` [PATCH 3/4] ASoC: Intel: Multiple I/O PCM format support for pipe Mateusz Gorski
2020-04-21 20:25 ` [PATCH 4/4] ASoC: Intel: Skylake: Automatic DMIC format configuration according to information from NHLT Mateusz Gorski
2020-04-21 20:55 ` Pierre-Louis Bossart
2020-04-22 12:04 ` Gorski, Mateusz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200421202519.4008-2-mateusz.gorski@linux.intel.com \
--to=mateusz.gorski@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=cezary.rojewski@intel.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox