mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: Pavel Machek <pavel@ucw.cz>, Jacek Anaszewski <j.anaszewski@samsung.com>
Cc: linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org,
	Hans de Goede <hdegoede@redhat.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Andrew Lunn <andrew@lunn.ch>
Subject: Re: [PATCH] leds: Add mutex protection in brightness_show()
Date: Wed, 9 Nov 2016 22:23:51 +0100	[thread overview]
Message-ID: <b4d76bf3-c973-c12a-23a9-69c6d47d0ffb@gmail.com> (raw)
In-Reply-To: <20161109123800.GB3488@amd>

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

      reply	other threads:[~2016-11-09 21:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-04  7:52 Jacek Anaszewski
2016-11-04 11:53 ` Hans de Goede
2016-11-04 16:06   ` Jacek Anaszewski
2016-11-04 16:46     ` Hans de Goede
2016-11-06 14:52       ` Hans de Goede
2016-11-07  9:11         ` Jacek Anaszewski
2016-11-09 12:37           ` Pavel Machek
2016-11-09 20:26             ` Pavel Machek
2016-11-09 21:23               ` Jacek Anaszewski
2016-11-09 12:38 ` Pavel Machek
2016-11-09 21:23   ` Jacek Anaszewski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b4d76bf3-c973-c12a-23a9-69c6d47d0ffb@gmail.com \
    --to=jacek.anaszewski@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=hdegoede@redhat.com \
    --cc=j.anaszewski@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®