Re: [PATCH v2 2/5] platform/chrome: cros_ec_lpc: MEC access can use an AML mutex

From: Tzung-Bi Shih
Date: Mon Jun 03 2024 - 05:36:35 EST


On Mon, Jun 03, 2024 at 07:38:31AM +0100, Ben Walsh wrote:
> +static int cros_ec_lpc_mec_lock(void)
> +{
> + bool success;
> +
> + if (!aml_mutex) {
> + mutex_lock(&io_mutex);
> + return 0;
> + }
> +
> + success = ACPI_SUCCESS(acpi_acquire_mutex(aml_mutex,
> + NULL, ACPI_LOCK_DELAY_MS));
> +

The blank line can be dropped. It's up to you.

> +static int cros_ec_lpc_mec_unlock(void)
> +{
> + bool success;
> +
> + if (!aml_mutex) {
> + mutex_unlock(&io_mutex);
> + return 0;
> + }
> +
> + success = ACPI_SUCCESS(acpi_release_mutex(aml_mutex, NULL));
> +

Same here.