diff options
author | Lukas Wunner <lukas@wunner.de> | 2016-03-24 15:15:20 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-04-09 04:12:58 +0300 |
commit | c68ae33e7fb4a010f9a48af3e4b87089dca96551 (patch) | |
tree | a692971cf4b6a9a36b81210d17e33d1107429f1a /sound | |
parent | 9735a22799b9214d17d3c231fe377fc852f042e9 (diff) | |
download | linux-c68ae33e7fb4a010f9a48af3e4b87089dca96551.tar.xz |
ACPI / utils: Rename acpi_dev_present()
acpi_dev_present() was originally named after pci_dev_present()
to signify the similarity of the two functions.
However Rafael J. Wysocki pointed out that the exported function
acpi_dev_present() is easily confused with the non-exported
acpi_device_is_present(). Additionally in ACPI parlance the term
"present" usually refers to the "device is present" bit returned
by the _STA control method, yet acpi_dev_present() merely checks
presence in the namespace. It does not invoke _STA at all, let
alone check the "device is present" bit.
As suggested by Rafael, rename the function to acpi_dev_found()
and adjust all existing call sites.
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/thinkpad_helper.c | 2 | ||||
-rw-r--r-- | sound/soc/intel/boards/cht_bsw_max98090_ti.c | 2 | ||||
-rw-r--r-- | sound/soc/intel/boards/cht_bsw_rt5645.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/sound/pci/hda/thinkpad_helper.c b/sound/pci/hda/thinkpad_helper.c index 59ab6cee1ad8..f0955fd7a2e7 100644 --- a/sound/pci/hda/thinkpad_helper.c +++ b/sound/pci/hda/thinkpad_helper.c @@ -13,7 +13,7 @@ static void (*old_vmaster_hook)(void *, int); static bool is_thinkpad(struct hda_codec *codec) { return (codec->core.subsystem_id >> 16 == 0x17aa) && - (acpi_dev_present("LEN0068") || acpi_dev_present("IBM0068")); + (acpi_dev_found("LEN0068") || acpi_dev_found("IBM0068")); } static void update_tpacpi_mute_led(void *private_data, int enabled) diff --git a/sound/soc/intel/boards/cht_bsw_max98090_ti.c b/sound/soc/intel/boards/cht_bsw_max98090_ti.c index e609f089593a..ac60b04540fd 100644 --- a/sound/soc/intel/boards/cht_bsw_max98090_ti.c +++ b/sound/soc/intel/boards/cht_bsw_max98090_ti.c @@ -296,7 +296,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev) if (!drv) return -ENOMEM; - drv->ts3a227e_present = acpi_dev_present("104C227E"); + drv->ts3a227e_present = acpi_dev_found("104C227E"); if (!drv->ts3a227e_present) { /* no need probe TI jack detection chip */ snd_soc_card_cht.aux_dev = NULL; diff --git a/sound/soc/intel/boards/cht_bsw_rt5645.c b/sound/soc/intel/boards/cht_bsw_rt5645.c index 2a6f80843bc9..3f2c1ea3a83e 100644 --- a/sound/soc/intel/boards/cht_bsw_rt5645.c +++ b/sound/soc/intel/boards/cht_bsw_rt5645.c @@ -357,7 +357,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_dev_present(snd_soc_cards[i].codec_id)) { + if (acpi_dev_found(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; |