summaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-berlin.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2019-03-25 10:49:33 +0100
committerThierry Reding <thierry.reding@gmail.com>2019-05-09 17:09:54 +0200
commite926b12c611c2095c7976e2ed31753ad6eb5ff1a (patch)
treec0c74a6953c3949d1d5007cb4e2eb3c6dca287dd /drivers/pwm/pwm-berlin.c
parent738a1cfec2edb4a6c53ac34fcb29447227dd135e (diff)
pwm: Clear chip_data in pwm_put()
After a PWM is disposed by its user the per chip data becomes invalid. Clear the data in common code instead of the device drivers to get consistent behaviour. Before this patch only three of nine drivers cleaned up here. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm/pwm-berlin.c')
-rw-r--r--drivers/pwm/pwm-berlin.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-berlin.c b/drivers/pwm/pwm-berlin.c
index 7c8d6a168ceb..b91c477cc84b 100644
--- a/drivers/pwm/pwm-berlin.c
+++ b/drivers/pwm/pwm-berlin.c
@@ -84,7 +84,6 @@ static void berlin_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm)
{
struct berlin_pwm_channel *channel = pwm_get_chip_data(pwm);
- pwm_set_chip_data(pwm, NULL);
kfree(channel);
}