aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Wunner <lukas@wunner.de>2016-03-24 08:15:20 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-04-08 21:12:58 -0400
commitc68ae33e7fb4a010f9a48af3e4b87089dca96551 (patch)
treea692971cf4b6a9a36b81210d17e33d1107429f1a
parent9735a22799b9214d17d3c231fe377fc852f042e9 (diff)
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>
-rw-r--r--drivers/acpi/utils.c6
-rw-r--r--include/acpi/acpi_bus.h2
-rw-r--r--include/linux/apple-gmux.h2
-rw-r--r--sound/pci/hda/thinkpad_helper.c2
-rw-r--r--sound/soc/intel/boards/cht_bsw_max98090_ti.c2
-rw-r--r--sound/soc/intel/boards/cht_bsw_rt5645.c2
6 files changed, 8 insertions, 8 deletions
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index 050673f0c0b3..ac832bf6f8c9 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -707,7 +707,7 @@ bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, int rev, u64 funcs)
707EXPORT_SYMBOL(acpi_check_dsm); 707EXPORT_SYMBOL(acpi_check_dsm);
708 708
709/** 709/**
710 * acpi_dev_present - Detect presence of a given ACPI device in the system. 710 * acpi_dev_found - Detect presence of a given ACPI device in the namespace.
711 * @hid: Hardware ID of the device. 711 * @hid: Hardware ID of the device.
712 * 712 *
713 * Return %true if the device was present at the moment of invocation. 713 * Return %true if the device was present at the moment of invocation.
@@ -719,7 +719,7 @@ EXPORT_SYMBOL(acpi_check_dsm);
719 * instead). Calling from module_init() is fine (which is synonymous 719 * instead). Calling from module_init() is fine (which is synonymous
720 * with device_initcall()). 720 * with device_initcall()).
721 */ 721 */
722bool acpi_dev_present(const char *hid) 722bool acpi_dev_found(const char *hid)
723{ 723{
724 struct acpi_device_bus_id *acpi_device_bus_id; 724 struct acpi_device_bus_id *acpi_device_bus_id;
725 bool found = false; 725 bool found = false;
@@ -734,7 +734,7 @@ bool acpi_dev_present(const char *hid)
734 734
735 return found; 735 return found;
736} 736}
737EXPORT_SYMBOL(acpi_dev_present); 737EXPORT_SYMBOL(acpi_dev_found);
738 738
739/* 739/*
740 * acpi_backlight= handling, this is done here rather then in video_detect.c 740 * acpi_backlight= handling, this is done here rather then in video_detect.c
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 14362a84c78e..a84fd1533e24 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -87,7 +87,7 @@ acpi_evaluate_dsm_typed(acpi_handle handle, const u8 *uuid, int rev, int func,
87 .package.elements = (eles) \ 87 .package.elements = (eles) \
88 } 88 }
89 89
90bool acpi_dev_present(const char *hid); 90bool acpi_dev_found(const char *hid);
91 91
92#ifdef CONFIG_ACPI 92#ifdef CONFIG_ACPI
93 93
diff --git a/include/linux/apple-gmux.h b/include/linux/apple-gmux.h
index b2d32e01dfe4..714186de8c36 100644
--- a/include/linux/apple-gmux.h
+++ b/include/linux/apple-gmux.h
@@ -35,7 +35,7 @@
35 */ 35 */
36static inline bool apple_gmux_present(void) 36static inline bool apple_gmux_present(void)
37{ 37{
38 return acpi_dev_present(GMUX_ACPI_HID); 38 return acpi_dev_found(GMUX_ACPI_HID);
39} 39}
40 40
41#else /* !CONFIG_APPLE_GMUX */ 41#else /* !CONFIG_APPLE_GMUX */
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);
13static bool is_thinkpad(struct hda_codec *codec) 13static bool is_thinkpad(struct hda_codec *codec)
14{ 14{
15 return (codec->core.subsystem_id >> 16 == 0x17aa) && 15 return (codec->core.subsystem_id >> 16 == 0x17aa) &&
16 (acpi_dev_present("LEN0068") || acpi_dev_present("IBM0068")); 16 (acpi_dev_found("LEN0068") || acpi_dev_found("IBM0068"));
17} 17}
18 18
19static void update_tpacpi_mute_led(void *private_data, int enabled) 19static 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)
296 if (!drv) 296 if (!drv)
297 return -ENOMEM; 297 return -ENOMEM;
298 298
299 drv->ts3a227e_present = acpi_dev_present("104C227E"); 299 drv->ts3a227e_present = acpi_dev_found("104C227E");
300 if (!drv->ts3a227e_present) { 300 if (!drv->ts3a227e_present) {
301 /* no need probe TI jack detection chip */ 301 /* no need probe TI jack detection chip */
302 snd_soc_card_cht.aux_dev = NULL; 302 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)
357 return -ENOMEM; 357 return -ENOMEM;
358 358
359 for (i = 0; i < ARRAY_SIZE(snd_soc_cards); i++) { 359 for (i = 0; i < ARRAY_SIZE(snd_soc_cards); i++) {
360 if (acpi_dev_present(snd_soc_cards[i].codec_id)) { 360 if (acpi_dev_found(snd_soc_cards[i].codec_id)) {
361 dev_dbg(&pdev->dev, 361 dev_dbg(&pdev->dev,
362 "found codec %s\n", snd_soc_cards[i].codec_id); 362 "found codec %s\n", snd_soc_cards[i].codec_id);
363 card = snd_soc_cards[i].soc_card; 363 card = snd_soc_cards[i].soc_card;