[PATCH v1 3/3] ACPI: TAD: Use PM_RUNTIME_ACQUIRE()/PM_RUNTIME_ACQUIRE_ERR

Rafael J. Wysocki
2025-11-07T18:42:10Z

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Use new PM_RUNTIME_ACQUIRE() and PM_RUNTIME_ACQUIRE_ERR wrapper macros
to make the code look more straightforward.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
drivers/acpi/acpi_tad.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)

--- a/drivers/acpi/acpi_tad.c
+++ b/drivers/acpi/acpi_tad.c
@@ -90,8 +90,8 @@ static int acpi_tad_set_real_time(struct
args[0].buffer.pointer = (u8 *)rt;
args[0].buffer.length = sizeof(*rt);

- ACQUIRE(pm_runtime_active_try, pm)(dev);
- if (ACQUIRE_ERR(pm_runtime_active_try, &pm))
+ PM_RUNTIME_ACQUIRE(dev);
+ if (PM_RUNTIME_ACQUIRE_ERR)
return -ENXIO;

status = acpi_evaluate_integer(handle, "_SRT", &arg_list, &retval);
@@ -137,8 +137,8 @@ static int acpi_tad_get_real_time(struct
{
int ret;

- ACQUIRE(pm_runtime_active_try, pm)(dev);
- if (ACQUIRE_ERR(pm_runtime_active_try, &pm))
+ PM_RUNTIME_ACQUIRE(dev);
+ if (PM_RUNTIME_ACQUIRE_ERR)
return -ENXIO;

ret = acpi_tad_evaluate_grt(dev, rt);
@@ -275,8 +275,8 @@ static int acpi_tad_wake_set(struct devi
args[0].integer.value = timer_id;
args[1].integer.value = value;

- ACQUIRE(pm_runtime_active_try, pm)(dev);
- if (ACQUIRE_ERR(pm_runtime_active_try, &pm))
+ PM_RUNTIME_ACQUIRE(dev);
+ if (PM_RUNTIME_ACQUIRE_ERR)
return -ENXIO;

status = acpi_evaluate_integer(handle, method, &arg_list, &retval);
@@ -322,8 +322,8 @@ static ssize_t acpi_tad_wake_read(struct

args[0].integer.value = timer_id;

- ACQUIRE(pm_runtime_active_try, pm)(dev);
- if (ACQUIRE_ERR(pm_runtime_active_try, &pm))
+ PM_RUNTIME_ACQUIRE(dev);
+ if (PM_RUNTIME_ACQUIRE_ERR)
return -ENXIO;

status = acpi_evaluate_integer(handle, method, &arg_list, &retval);
@@ -377,8 +377,8 @@ static int acpi_tad_clear_status(struct

args[0].integer.value = timer_id;

- ACQUIRE(pm_runtime_active_try, pm)(dev);
- if (ACQUIRE_ERR(pm_runtime_active_try, &pm))
+ PM_RUNTIME_ACQUIRE(dev);
+ if (PM_RUNTIME_ACQUIRE_ERR)
return -ENXIO;

status = acpi_evaluate_integer(handle, "_CWS", &arg_list, &retval);
@@ -417,8 +417,8 @@ static ssize_t acpi_tad_status_read(stru

args[0].integer.value = timer_id;

- ACQUIRE(pm_runtime_active_try, pm)(dev);
- if (ACQUIRE_ERR(pm_runtime_active_try, &pm))
+ PM_RUNTIME_ACQUIRE(dev);
+ if (PM_RUNTIME_ACQUIRE_ERR)
return -ENXIO;

status = acpi_evaluate_integer(handle, "_GWS", &arg_list, &retval);