# Re: \[PATCH\] simplefb: Disable and release clocks and regulators in destroy callback

- From: Tomi Valkeinen \<hidden\>
- Date: 2016-09-27 08:22:59 
- List: linux-fbdev
- Page: https://ratatoskr.run/linux-fbdev/2016/09/4844385
- Thread: https://ratatoskr.run/linux-fbdev/2016/09/4830569/t.md

```text
On 07/09/16 12:09, Chen-Yu Tsai wrote:
> simplefb gets unregister when a proper framebuffer driver comes in and
> kicks it out. However the claimed clocks and regulators stay enabled
> as they are only released in the platform device remove function, which
> in theory would never get called.
> 
> Move the clock/regulator cleanup into the framebuffer destroy callback,
> which gets called as part of the framebuffer unregister process.
> 
> Note this introduces asymmetry in how the resources are claimed and
> released.
> 
> Signed-off-by: Chen-Yu Tsai <redacted>
> ---
>  drivers/video/fbdev/simplefb.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)

Thanks, queued for 4.9.

 Tomi

```

## Attachments

- [signature.asc](https://ratatoskr.run/linux-fbdev/2016/09/4844385/attachment/0) (application/pgp-signature, 819 bytes)
