simplefb: Disable and release clocks and regulators in destroy callback
authorChen-Yu Tsai <wens@csie.org>
Wed, 7 Sep 2016 09:09:19 +0000 (17:09 +0800)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 27 Sep 2016 08:21:36 +0000 (11:21 +0300)
commit7c9806e82588cd9601ab2d30ca3bfb5b8fda2965
treeb20e4105b3ffc482049971f4edd1e1bf95e29fa5
parentca9384c5911199257cbdf48f1bc3e3986de611a2
simplefb: Disable and release clocks and regulators in destroy callback

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 <wens@csie.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/fbdev/simplefb.c