Re: [PATCH 2/5] platform: arm64: add Huawei Matebook E Go (sc8280xp) EC driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



…
> +++ b/drivers/platform/arm64/huawei-gaokun-ec.c
> @@ -0,0 +1,598 @@
…
> +static int gaokun_ec_request(struct gaokun_ec *ec, const u8 *req,
> +			     size_t resp_len, u8 *resp)
> +{
…
> +	mutex_lock(&ec->lock);
> +
> +	i2c_transfer(client->adapter, msgs, 2);
> +	usleep_range(2000, 2500);
> +
> +	mutex_unlock(&ec->lock);
> +
> +	return *resp;
> +}
…

Under which circumstances would you become interested to apply a statement
like “guard(mutex)(&ec->lock);”?
https://elixir.bootlin.com/linux/v6.13-rc3/source/include/linux/mutex.h#L201

Regards,
Markus





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux