ASoC: move ACPI common code out of Intel/sst tree

ACPI support is not specific to the Intel/SST driver. Move the enumeration
and matching code which is not hardware-dependent to sound/soc and rename
relevant sst_acpi_ structures and functions with snd_soc_acpi_ prefix

soc-acpi.h is protected by a #ifndef __LINUX_SND_SOC_ACPI_H for
consistency with all other SoC .h files:

grep -L __LINUX include/sound/soc* | wc -l
0
grep __LINUX include/sound/soc* | wc -l
14

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
这个提交包含在:
Pierre-Louis Bossart
2017-10-12 18:49:38 -05:00
提交者 Mark Brown
父节点 39712db878
当前提交 7feb2f786a
修改 16 个文件,包含 203 行新增172 行删除

查看文件

@@ -40,9 +40,9 @@
#include <acpi/acpi_bus.h>
#include <asm/cpu_device_id.h>
#include <asm/iosf_mbi.h>
#include <sound/soc-acpi.h>
#include "../sst-mfld-platform.h"
#include "../../common/sst-dsp.h"
#include "../../common/sst-acpi.h"
#include "sst.h"
/* LPE viewpoint addresses */
@@ -284,7 +284,7 @@ static int sst_acpi_probe(struct platform_device *pdev)
int ret = 0;
struct intel_sst_drv *ctx;
const struct acpi_device_id *id;
struct sst_acpi_mach *mach;
struct snd_soc_acpi_mach *mach;
struct platform_device *mdev;
struct platform_device *plat_dev;
struct sst_platform_info *pdata;
@@ -296,8 +296,8 @@ static int sst_acpi_probe(struct platform_device *pdev)
return -ENODEV;
dev_dbg(dev, "for %s\n", id->id);
mach = (struct sst_acpi_mach *)id->driver_data;
mach = sst_acpi_find_machine(mach);
mach = (struct snd_soc_acpi_mach *)id->driver_data;
mach = snd_soc_acpi_find_machine(mach);
if (mach == NULL) {
dev_err(dev, "No matching machine driver found\n");
return -ENODEV;
@@ -435,7 +435,7 @@ static const struct dmi_system_id cht_table[] = {
};
static struct sst_acpi_mach cht_surface_mach = {
static struct snd_soc_acpi_mach cht_surface_mach = {
.id = "10EC5640",
.drv_name = "cht-bsw-rt5645",
.fw_filename = "intel/fw_sst_22a8.bin",
@@ -443,7 +443,7 @@ static struct sst_acpi_mach cht_surface_mach = {
.pdata = &chv_platform_data,
};
static struct sst_acpi_mach byt_thinkpad_10 = {
static struct snd_soc_acpi_mach byt_thinkpad_10 = {
.id = "10EC5640",
.drv_name = "cht-bsw-rt5672",
.fw_filename = "intel/fw_sst_0f28.bin",
@@ -451,9 +451,9 @@ static struct sst_acpi_mach byt_thinkpad_10 = {
.pdata = &byt_rvp_platform_data,
};
static struct sst_acpi_mach *cht_quirk(void *arg)
static struct snd_soc_acpi_mach *cht_quirk(void *arg)
{
struct sst_acpi_mach *mach = arg;
struct snd_soc_acpi_mach *mach = arg;
dmi_check_system(cht_table);
@@ -463,9 +463,9 @@ static struct sst_acpi_mach *cht_quirk(void *arg)
return mach;
}
static struct sst_acpi_mach *byt_quirk(void *arg)
static struct snd_soc_acpi_mach *byt_quirk(void *arg)
{
struct sst_acpi_mach *mach = arg;
struct snd_soc_acpi_mach *mach = arg;
dmi_check_system(byt_table);
@@ -476,7 +476,7 @@ static struct sst_acpi_mach *byt_quirk(void *arg)
}
static struct sst_acpi_mach sst_acpi_bytcr[] = {
static struct snd_soc_acpi_mach sst_acpi_bytcr[] = {
{
.id = "10EC5640",
.drv_name = "bytcr_rt5640",
@@ -560,7 +560,7 @@ static struct sst_acpi_mach sst_acpi_bytcr[] = {
};
/* Cherryview-based platforms: CherryTrail and Braswell */
static struct sst_acpi_mach sst_acpi_chv[] = {
static struct snd_soc_acpi_mach sst_acpi_chv[] = {
{
.id = "10EC5670",
.drv_name = "cht-bsw-rt5672",