[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2bfc3077-7ef4-45bc-b747-caf0a701f987@web.de>
Date: Tue, 25 Mar 2025 20:15:31 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: Nam Tran <trannamatk@...il.com>, linux-leds@...r.kernel.org,
devicetree@...r.kernel.org
Cc: LKML <linux-kernel@...r.kernel.org>, Conor Dooley <conor+dt@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Lee Jones <lee@...nel.org>,
Pavel Machek <pavel@...nel.org>, Rob Herring <robh@...nel.org>
Subject: Re: [PATCH v3 3/3] leds: add new LED driver for TI LP5812
…
> +++ b/drivers/leds/leds-lp5812.c
> @@ -0,0 +1,2190 @@
…
> +static ssize_t device_enable_show(struct device *dev,
> + struct device_attribute *attr,
> + char *buf)
> +{
…
> + mutex_lock(&chip->lock);
> + if (lp5812_read(chip, chip->regs->enable_reg, &enable)) {
> + mutex_unlock(&chip->lock);
> + return -EIO;
> + }
> + mutex_unlock(&chip->lock);
> +
> + return sprintf(buf, "%d\n", enable);
> +}
…
Under which circumstances would you become interested to apply a statement
like “guard(mutex)(&chip->lock);”?
https://elixir.bootlin.com/linux/v6.14-rc6/source/include/linux/mutex.h#L201
Regards,
Markus
Powered by blists - more mailing lists