pwm: Unexport children before chip removal

commit 0733424c9b upstream.

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: 76abbdde2d ("pwm: Add sysfs interface")
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
David Hsu 2016-08-09 14:57:46 -07:00 • committed by Ben Hutchings
commit 1eb985ab57
3 changed files with 25 additions and 0 deletions