diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2019-03-25 10:49:33 +0100 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2019-05-09 17:09:54 +0200 |
commit | e926b12c611c2095c7976e2ed31753ad6eb5ff1a (patch) | |
tree | c0c74a6953c3949d1d5007cb4e2eb3c6dca287dd /drivers/pwm/pwm-samsung.c | |
parent | 738a1cfec2edb4a6c53ac34fcb29447227dd135e (diff) | |
download | linux-e926b12c611c2095c7976e2ed31753ad6eb5ff1a.tar.bz2 |
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-samsung.c')
-rw-r--r-- | drivers/pwm/pwm-samsung.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-samsung.c b/drivers/pwm/pwm-samsung.c index 062f2cfc45ec..3762432dd6a7 100644 --- a/drivers/pwm/pwm-samsung.c +++ b/drivers/pwm/pwm-samsung.c @@ -238,7 +238,6 @@ static int pwm_samsung_request(struct pwm_chip *chip, struct pwm_device *pwm) static void pwm_samsung_free(struct pwm_chip *chip, struct pwm_device *pwm) { devm_kfree(chip->dev, pwm_get_chip_data(pwm)); - pwm_set_chip_data(pwm, NULL); } static int pwm_samsung_enable(struct pwm_chip *chip, struct pwm_device *pwm) |