diff options
author | Lukas Wunner <lukas@wunner.de> | 2016-03-24 08:15:20 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-04-08 21:12:58 -0400 |
commit | c68ae33e7fb4a010f9a48af3e4b87089dca96551 (patch) | |
tree | a692971cf4b6a9a36b81210d17e33d1107429f1a /drivers/acpi | |
parent | 9735a22799b9214d17d3c231fe377fc852f042e9 (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>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/utils.c | 6 |
1 files changed, 3 insertions, 3 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) | |||
707 | EXPORT_SYMBOL(acpi_check_dsm); | 707 | EXPORT_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 | */ |
722 | bool acpi_dev_present(const char *hid) | 722 | bool 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 | } |
737 | EXPORT_SYMBOL(acpi_dev_present); | 737 | EXPORT_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 |