Skip to content

Commit

Permalink
ACPICA: executer/exsystem: Add units to time variable names
Browse files Browse the repository at this point in the history
ACPICA commit b69cbef7a83eadb102a1ff6c6f6fc5abce34805a

`how_long` refers to different units in both functions, so make it more
clear, what unit they expect. That also makes one comment superfluous.

Link: https://github.com/acpica/acpica/commit/b69cbef7
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
pmenzel authored and Rafael J. Wysocki committed Apr 13, 2022
1 parent aa29b20 commit 1838ffe
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions drivers/acpi/acpica/exsystem.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ acpi_status acpi_ex_system_wait_mutex(acpi_mutex mutex, u16 timeout)
*
* FUNCTION: acpi_ex_system_do_stall
*
* PARAMETERS: how_long - The amount of time to stall,
* PARAMETERS: how_long_us - The amount of time to stall,
* in microseconds
*
* RETURN: Status
Expand All @@ -120,24 +120,24 @@ acpi_status acpi_ex_system_wait_mutex(acpi_mutex mutex, u16 timeout)
*
******************************************************************************/

acpi_status acpi_ex_system_do_stall(u32 how_long)
acpi_status acpi_ex_system_do_stall(u32 how_long_us)
{
acpi_status status = AE_OK;

ACPI_FUNCTION_ENTRY();

if (how_long > 255) { /* 255 microseconds */
if (how_long_us > 255) {
/*
* Longer than 255 usec, this is an error
* Longer than 255 microseconds, this is an error
*
* (ACPI specifies 100 usec as max, but this gives some slack in
* order to support existing BIOSs)
*/
ACPI_ERROR((AE_INFO,
"Time parameter is too large (%u)", how_long));
"Time parameter is too large (%u)", how_long_us));
status = AE_AML_OPERAND_VALUE;
} else {
acpi_os_stall(how_long);
acpi_os_stall(how_long_us);
}

return (status);
Expand All @@ -147,7 +147,7 @@ acpi_status acpi_ex_system_do_stall(u32 how_long)
*
* FUNCTION: acpi_ex_system_do_sleep
*
* PARAMETERS: how_long - The amount of time to sleep,
* PARAMETERS: how_long_ms - The amount of time to sleep,
* in milliseconds
*
* RETURN: None
Expand All @@ -156,7 +156,7 @@ acpi_status acpi_ex_system_do_stall(u32 how_long)
*
******************************************************************************/

acpi_status acpi_ex_system_do_sleep(u64 how_long)
acpi_status acpi_ex_system_do_sleep(u64 how_long_ms)
{
ACPI_FUNCTION_ENTRY();

Expand All @@ -168,11 +168,11 @@ acpi_status acpi_ex_system_do_sleep(u64 how_long)
* For compatibility with other ACPI implementations and to prevent
* accidental deep sleeps, limit the sleep time to something reasonable.
*/
if (how_long > ACPI_MAX_SLEEP) {
how_long = ACPI_MAX_SLEEP;
if (how_long_ms > ACPI_MAX_SLEEP) {
how_long_ms = ACPI_MAX_SLEEP;
}

acpi_os_sleep(how_long);
acpi_os_sleep(how_long_ms);

/* And now we must get the interpreter again */

Expand Down

0 comments on commit 1838ffe

Please sign in to comment.