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: NBoris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
Showing
想要评论请 注册 或 登录