|
@@ -333,20 +333,12 @@ static struct cht_acpi_card snd_soc_cards[] = {
|
|
|
{"10EC5650", CODEC_TYPE_RT5650, &snd_soc_card_chtrt5650},
|
|
|
};
|
|
|
|
|
|
-static acpi_status snd_acpi_codec_match(acpi_handle handle, u32 level,
|
|
|
- void *context, void **ret)
|
|
|
-{
|
|
|
- *(bool *)context = true;
|
|
|
- return AE_OK;
|
|
|
-}
|
|
|
-
|
|
|
static int snd_cht_mc_probe(struct platform_device *pdev)
|
|
|
{
|
|
|
int ret_val = 0;
|
|
|
int i;
|
|
|
struct cht_mc_private *drv;
|
|
|
struct snd_soc_card *card = snd_soc_cards[0].soc_card;
|
|
|
- bool found = false;
|
|
|
char codec_name[16];
|
|
|
|
|
|
drv = devm_kzalloc(&pdev->dev, sizeof(*drv), GFP_ATOMIC);
|
|
@@ -354,10 +346,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
|
|
|
return -ENOMEM;
|
|
|
|
|
|
for (i = 0; i < ARRAY_SIZE(snd_soc_cards); i++) {
|
|
|
- if (ACPI_SUCCESS(acpi_get_devices(
|
|
|
- snd_soc_cards[i].codec_id,
|
|
|
- snd_acpi_codec_match,
|
|
|
- &found, NULL)) && found) {
|
|
|
+ if (acpi_dev_present(snd_soc_cards[i].codec_id)) {
|
|
|
dev_dbg(&pdev->dev,
|
|
|
"found codec %s\n", snd_soc_cards[i].codec_id);
|
|
|
card = snd_soc_cards[i].soc_card;
|