[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b4d76bf3-c973-c12a-23a9-69c6d47d0ffb@gmail.com>
Date: Wed, 9 Nov 2016 22:23:51 +0100
From: Jacek Anaszewski <jacek.anaszewski@...il.com>
To: Pavel Machek <pavel@....cz>,
Jacek Anaszewski <j.anaszewski@...sung.com>
Cc: linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org,
Hans de Goede <hdegoede@...hat.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Andrew Lunn <andrew@...n.ch>
Subject: Re: [PATCH] leds: Add mutex protection in brightness_show()
Hi,
On 11/09/2016 01:38 PM, Pavel Machek wrote:
> Hi!
>
>> Initially the claim about no need for lock in brightness_show()
>> was valid as the function was just returning unchanged
>> LED brightness. After the addition of led_update_brightness() this
>
> The claim was probably wrong from the day one, unless brightness is of
> type "atomic_t".
>
> /* Ensures consistent access to the LED Flash Class device */
> struct mutex led_access;
> };
>
> This should really list fields that are protected by led_access.
Originally it was introduced to facilitate disabling LED subsystem
sysfs interface, i.e. it protects flags property of
struct led_classdev.
--
Best regards,
Jacek Anaszewski
Powered by blists - more mailing lists