]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ASoC: SOF: sof-client-probes: Only load the driver if IPC3 is used
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Tue, 12 Jul 2022 13:10:22 +0000 (16:10 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:45:49 +0000 (11:45 +0200)
[ Upstream commit 9b93eda355089b36482f7a2f134bdd24be70f907 ]

The current implementation of probes only supports IPC3 and should not be
loaded for other IPC implementation.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220712131022.1124-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/sof/sof-client-probes.c

index 34e6bd356e7179592de9be16c110ebd96a1b9dcb..60e4250fac8766e3fb369a474a5c641f7170b7f0 100644 (file)
@@ -693,6 +693,10 @@ static int sof_probes_client_probe(struct auxiliary_device *auxdev,
        if (!sof_probes_enabled)
                return -ENXIO;
 
+       /* only ipc3 is supported */
+       if (sof_client_get_ipc_type(cdev) != SOF_IPC)
+               return -ENXIO;
+
        if (!dev->platform_data) {
                dev_err(dev, "missing platform data\n");
                return -ENODEV;