]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ASoC: SOF: Intel: byt: remove duplicating driver data retrieval
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 5 Jul 2022 16:11:02 +0000 (19:11 +0300)
committerMark Brown <broonie@kernel.org>
Tue, 5 Jul 2022 18:54:03 +0000 (19:54 +0100)
device_get_match_data() in ACPI case calls similar to acpi_match_device().
Hence there is no need to duplicate the call. Just assign what is in
the id->driver_data.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220705161102.76250-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/byt.c

index 4ed8381ecedaa9de4e3fff1a5ff3e857efa4c526..e6dc4ff531c3464c62fb0f9b4ead6cefe4c3ce42 100644 (file)
@@ -465,10 +465,7 @@ static int sof_baytrail_probe(struct platform_device *pdev)
                return -ENODEV;
        }
 
-       desc = device_get_match_data(&pdev->dev);
-       if (!desc)
-               return -ENODEV;
-
+       desc = (const struct sof_dev_desc *)id->driver_data;
        if (desc == &sof_acpi_baytrail_desc && soc_intel_is_byt_cr(pdev))
                desc = &sof_acpi_baytrailcr_desc;