• B
    pwm: Get rid of pwm->lock · 459a25af
    Boris BREZILLON 提交于
    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: NBoris Brezillon <boris.brezillon@free-electrons.com>
    Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
    459a25af
sysfs.c 8.1 KB