Merge branch 'acpi-utils' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm into asoc-5.2
This commit is contained in:
@@ -226,7 +226,7 @@ static int bytcht_da7213_probe(struct platform_device *pdev)
|
||||
struct snd_soc_card *card;
|
||||
struct snd_soc_acpi_mach *mach;
|
||||
const char *platform_name;
|
||||
const char *i2c_name = NULL;
|
||||
struct acpi_device *adev;
|
||||
int dai_index = 0;
|
||||
int ret_val = 0;
|
||||
int i;
|
||||
@@ -244,10 +244,11 @@ static int bytcht_da7213_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
/* fixup codec name based on HID */
|
||||
i2c_name = acpi_dev_get_first_match_name(mach->id, NULL, -1);
|
||||
if (i2c_name) {
|
||||
adev = acpi_dev_get_first_match_dev(mach->id, NULL, -1);
|
||||
if (adev) {
|
||||
snprintf(codec_name, sizeof(codec_name),
|
||||
"%s%s", "i2c-", i2c_name);
|
||||
"i2c-%s", acpi_dev_name(adev));
|
||||
put_device(&adev->dev);
|
||||
dailink[dai_index].codec_name = codec_name;
|
||||
}
|
||||
|
||||
|
@@ -442,7 +442,7 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)
|
||||
struct device *dev = &pdev->dev;
|
||||
struct snd_soc_acpi_mach *mach;
|
||||
const char *platform_name;
|
||||
const char *i2c_name = NULL;
|
||||
struct acpi_device *adev;
|
||||
struct device *codec_dev;
|
||||
int dai_index = 0;
|
||||
int i;
|
||||
@@ -463,10 +463,11 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
/* fixup codec name based on HID */
|
||||
i2c_name = acpi_dev_get_first_match_name(mach->id, NULL, -1);
|
||||
if (i2c_name) {
|
||||
adev = acpi_dev_get_first_match_dev(mach->id, NULL, -1);
|
||||
if (adev) {
|
||||
snprintf(codec_name, sizeof(codec_name),
|
||||
"%s%s", "i2c-", i2c_name);
|
||||
"i2c-%s", acpi_dev_name(adev));
|
||||
put_device(&adev->dev);
|
||||
byt_cht_es8316_dais[dai_index].codec_name = codec_name;
|
||||
}
|
||||
|
||||
|
@@ -1154,7 +1154,7 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
|
||||
struct byt_rt5640_private *priv;
|
||||
struct snd_soc_acpi_mach *mach;
|
||||
const char *platform_name;
|
||||
const char *i2c_name = NULL;
|
||||
struct acpi_device *adev;
|
||||
int ret_val = 0;
|
||||
int dai_index = 0;
|
||||
int i;
|
||||
@@ -1178,11 +1178,11 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
/* fixup codec name based on HID */
|
||||
i2c_name = acpi_dev_get_first_match_name(mach->id, NULL, -1);
|
||||
if (i2c_name) {
|
||||
adev = acpi_dev_get_first_match_dev(mach->id, NULL, -1);
|
||||
if (adev) {
|
||||
snprintf(byt_rt5640_codec_name, sizeof(byt_rt5640_codec_name),
|
||||
"%s%s", "i2c-", i2c_name);
|
||||
|
||||
"i2c-%s", acpi_dev_name(adev));
|
||||
put_device(&adev->dev);
|
||||
byt_rt5640_dais[dai_index].codec_name = byt_rt5640_codec_name;
|
||||
}
|
||||
|
||||
|
@@ -885,8 +885,8 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
|
||||
struct byt_rt5651_private *priv;
|
||||
struct snd_soc_acpi_mach *mach;
|
||||
const char *platform_name;
|
||||
struct acpi_device *adev;
|
||||
struct device *codec_dev;
|
||||
const char *i2c_name = NULL;
|
||||
const char *hp_swapped;
|
||||
bool is_bytcr = false;
|
||||
int ret_val = 0;
|
||||
@@ -912,14 +912,16 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
/* fixup codec name based on HID */
|
||||
i2c_name = acpi_dev_get_first_match_name(mach->id, NULL, -1);
|
||||
if (!i2c_name) {
|
||||
adev = acpi_dev_get_first_match_dev(mach->id, NULL, -1);
|
||||
if (adev) {
|
||||
snprintf(byt_rt5651_codec_name, sizeof(byt_rt5651_codec_name),
|
||||
"i2c-%s", acpi_dev_name(adev));
|
||||
put_device(&adev->dev);
|
||||
byt_rt5651_dais[dai_index].codec_name = byt_rt5651_codec_name;
|
||||
} else {
|
||||
dev_err(&pdev->dev, "Error cannot find '%s' dev\n", mach->id);
|
||||
return -ENODEV;
|
||||
}
|
||||
snprintf(byt_rt5651_codec_name, sizeof(byt_rt5651_codec_name),
|
||||
"%s%s", "i2c-", i2c_name);
|
||||
byt_rt5651_dais[dai_index].codec_name = byt_rt5651_codec_name;
|
||||
|
||||
codec_dev = bus_find_device_by_name(&i2c_bus_type, NULL,
|
||||
byt_rt5651_codec_name);
|
||||
|
@@ -532,7 +532,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
|
||||
struct snd_soc_acpi_mach *mach;
|
||||
const char *platform_name;
|
||||
struct cht_mc_private *drv;
|
||||
const char *i2c_name = NULL;
|
||||
struct acpi_device *adev;
|
||||
bool found = false;
|
||||
bool is_bytcr = false;
|
||||
int dai_index = 0;
|
||||
@@ -573,10 +573,11 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
/* fixup codec name based on HID */
|
||||
i2c_name = acpi_dev_get_first_match_name(mach->id, NULL, -1);
|
||||
if (i2c_name) {
|
||||
adev = acpi_dev_get_first_match_dev(mach->id, NULL, -1);
|
||||
if (adev) {
|
||||
snprintf(cht_rt5645_codec_name, sizeof(cht_rt5645_codec_name),
|
||||
"%s%s", "i2c-", i2c_name);
|
||||
"i2c-%s", acpi_dev_name(adev));
|
||||
put_device(&adev->dev);
|
||||
cht_dailink[dai_index].codec_name = cht_rt5645_codec_name;
|
||||
}
|
||||
|
||||
|
@@ -401,7 +401,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
|
||||
struct cht_mc_private *drv;
|
||||
struct snd_soc_acpi_mach *mach = pdev->dev.platform_data;
|
||||
const char *platform_name;
|
||||
const char *i2c_name;
|
||||
struct acpi_device *adev;
|
||||
int i;
|
||||
|
||||
drv = devm_kzalloc(&pdev->dev, sizeof(*drv), GFP_KERNEL);
|
||||
@@ -411,10 +411,11 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
|
||||
strcpy(drv->codec_name, RT5672_I2C_DEFAULT);
|
||||
|
||||
/* fixup codec name based on HID */
|
||||
i2c_name = acpi_dev_get_first_match_name(mach->id, NULL, -1);
|
||||
if (i2c_name) {
|
||||
adev = acpi_dev_get_first_match_dev(mach->id, NULL, -1);
|
||||
if (adev) {
|
||||
snprintf(drv->codec_name, sizeof(drv->codec_name),
|
||||
"i2c-%s", i2c_name);
|
||||
"i2c-%s", acpi_dev_name(adev));
|
||||
put_device(&adev->dev);
|
||||
for (i = 0; i < ARRAY_SIZE(cht_dailink); i++) {
|
||||
if (!strcmp(cht_dailink[i].codec_name,
|
||||
RT5672_I2C_DEFAULT)) {
|
||||
|
Reference in New Issue
Block a user