aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i2c
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2014-01-25 12:14:42 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-02-02 11:44:50 -0500
commitfc275a74eb816c12d4fc226344e734872ed0b2f9 (patch)
tree1229313932101cd993ade97bd408d5543f14b875 /drivers/gpu/drm/i2c
parent6ae668cc19e8b18df28cd67b3448d9abd79284a4 (diff)
drm/i2c: tda998x: free the CEC device on encoder_destroy
The cec i2c device is created in tda998x_encoder_init() when the DRM driver starts. This patch frees it when the DRM driver is unloaded. Tested-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/gpu/drm/i2c')
-rw-r--r--drivers/gpu/drm/i2c/tda998x_drv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c
index c37180abcc4b..de0572ec597e 100644
--- a/drivers/gpu/drm/i2c/tda998x_drv.c
+++ b/drivers/gpu/drm/i2c/tda998x_drv.c
@@ -1094,6 +1094,8 @@ tda998x_encoder_destroy(struct drm_encoder *encoder)
1094{ 1094{
1095 struct tda998x_priv *priv = to_tda998x_priv(encoder); 1095 struct tda998x_priv *priv = to_tda998x_priv(encoder);
1096 drm_i2c_encoder_destroy(encoder); 1096 drm_i2c_encoder_destroy(encoder);
1097 if (priv->cec)
1098 i2c_unregister_device(priv->cec);
1097 kfree(priv); 1099 kfree(priv);
1098} 1100}
1099 1101