pwm: Unexport children before chip removal
authorDavid Hsu <davidhsu@google.com>
Tue, 9 Aug 2016 21:57:46 +0000 (14:57 -0700)
committerThierry Reding <thierry.reding@gmail.com>
Mon, 5 Sep 2016 14:45:39 +0000 (16:45 +0200)
commit0733424c9ba9f42242409d1ece780777272f7ea1
tree7d4ab85ed86beb175351738eef22132d8987678e
parent29b4817d4018df78086157ea3a55c1d9424a7cfc
pwm: Unexport children before chip removal

Exported pwm channels aren't removed before the pwmchip and are
leaked. This results in invalid sysfs files. This fix removes
all exported pwm channels before chip removal.

Signed-off-by: David Hsu <davidhsu@google.com>
Fixes: 76abbdde2d95 ("pwm: Add sysfs interface")
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/core.c
drivers/pwm/sysfs.c
include/linux/pwm.h