drm/meson: dw-hdmi: Disable clocks on driver teardown
authorMarc Zyngier <maz@kernel.org>
Fri, 20 Nov 2020 09:42:04 +0000 (09:42 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:53:18 +0000 (11:53 +0100)
commitd0ef2d794000fba8b7a0f3f45e54c7d2541bd974
tree12bee92e640c75fffc0458e37f09cf6a39615b48
parentddbed6d02751a02f95f520767cf4900feaa5a93d
drm/meson: dw-hdmi: Disable clocks on driver teardown

[ Upstream commit 1dfeea904550c11eccf3fd5f6256e4b0f0208dfe ]

The HDMI driver request clocks early, but never disable them, leaving
the clocks on even when the driver is removed.

Fix it by slightly refactoring the clock code, and register a devm
action that will eventually disable/unprepare the enabled clocks.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201120094205.525228-2-maz@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/meson/meson_dw_hdmi.c