]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
pwm: Unexport children before chip removal
authorDavid Hsu <davidhsu@google.com>
Tue, 9 Aug 2016 21:57:46 +0000 (14:57 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Nov 2016 15:38:56 +0000 (16:38 +0100)
commitfedede0963c48829992a810d9ae61f0424949373
tree3fdc2d067b51159edaf0f13d3b109763604acd48
parent7b4b77b9566db17afea107bcc70d348a5dd97048
pwm: Unexport children before chip removal

commit 0733424c9ba9f42242409d1ece780777272f7ea1 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: 76abbdde2d95 ("pwm: Add sysfs interface")
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pwm/core.c
drivers/pwm/sysfs.c
include/linux/pwm.h