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>
This commit is contained in:

committed by
Thierry Reding

parent
738a1cfec2
commit
e926b12c61
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user