pwm: Get rid of pwm->lock
authorBoris BREZILLON <boris.brezillon@free-electrons.com>
Wed, 30 Mar 2016 20:03:27 +0000 (22:03 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Tue, 17 May 2016 12:44:59 +0000 (14:44 +0200)
commit459a25afe97cb3d7f978b90c881f4d7aac8fb755
tree233902a29b5d0f418de168ffe531149b997cbcf4
parent4ff66efd59102280a71d432c9f0e89cdaf66b849
pwm: Get rid of pwm->lock

PWM devices are not protected against concurrent accesses. The lock in
struct pwm_device might let PWM users think it is, but it's actually
only protecting the enabled state.

Removing this lock should be fine as long as all PWM users are aware
that accesses to the PWM device have to be serialized, which seems to be
the case for all of them except the sysfs interface. Patch the sysfs
code by adding a lock to the pwm_export struct and making sure it's
taken for all relevant accesses to the exported PWM device.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/core.c
drivers/pwm/sysfs.c
include/linux/pwm.h
This page took 0.032676 seconds and 5 git commands to generate.