diff options
author | Vinod Koul <vinod.koul@intel.com> | 2015-11-05 21:34:11 +0530 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-11-16 10:08:09 +0000 |
commit | 95f098014815b330838b1173d3d7bcea3b481242 (patch) | |
tree | f2e5a5228525a763aac80c230ab5d8fd36f66072 /sound/soc/intel/common/sst-acpi.c | |
parent | 7ae3cb15590ea768323b5e5a6be1769f19e91044 (diff) | |
download | linux-95f098014815b330838b1173d3d7bcea3b481242.tar.bz2 |
ASoC: Intel: Move apci find machine routines
This code to find the machine is common for all drivers so move
it to a separate file and header for use in other drivers
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/common/sst-acpi.c')
-rw-r--r-- | sound/soc/intel/common/sst-acpi.c | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/sound/soc/intel/common/sst-acpi.c b/sound/soc/intel/common/sst-acpi.c index 67b6d3d52f57..94a43e6fcf88 100644 --- a/sound/soc/intel/common/sst-acpi.c +++ b/sound/soc/intel/common/sst-acpi.c @@ -21,21 +21,12 @@ #include <linux/platform_device.h> #include "sst-dsp.h" +#include "sst-acpi.h" #define SST_LPT_DSP_DMA_ADDR_OFFSET 0x0F0000 #define SST_WPT_DSP_DMA_ADDR_OFFSET 0x0FE000 #define SST_LPT_DSP_DMA_SIZE (1024 - 1) -/* Descriptor for SST ASoC machine driver */ -struct sst_acpi_mach { - /* ACPI ID for the matching machine driver. Audio codec for instance */ - const u8 id[ACPI_ID_LEN]; - /* machine driver name */ - const char *drv_name; - /* firmware file name */ - const char *fw_filename; -}; - /* Descriptor for setting up SST platform data */ struct sst_acpi_desc { const char *drv_name; @@ -88,28 +79,6 @@ static void sst_acpi_fw_cb(const struct firmware *fw, void *context) return; } -static acpi_status sst_acpi_mach_match(acpi_handle handle, u32 level, - void *context, void **ret) -{ - *(bool *)context = true; - return AE_OK; -} - -static struct sst_acpi_mach *sst_acpi_find_machine( - struct sst_acpi_mach *machines) -{ - struct sst_acpi_mach *mach; - bool found = false; - - for (mach = machines; mach->id[0]; mach++) - if (ACPI_SUCCESS(acpi_get_devices(mach->id, - sst_acpi_mach_match, - &found, NULL)) && found) - return mach; - - return NULL; -} - static int sst_acpi_probe(struct platform_device *pdev) { const struct acpi_device_id *id; |