Skip to content

Commit

Permalink
drm/i2c: tda998x: move drm_i2c_encoder_destroy call
Browse files Browse the repository at this point in the history
Currently tda998x_encoder_destroy() calls cec_write() and reg_clear(),
as part of the release procedure. Such calls need to access the I2C bus
and therefore, we need to call them before drm_i2c_encoder_destroy()
which unregisters the I2C device.

This commit moves the latter so it's done afterwards.

Signed-off-by: Guido Martínez <guido@vanguardiasur.com.ar>
Signed-off-by: Ezequiel García <ezequiel@vanguardiasur.com.ar>
Cc: <stable@vger.kernel.org> #v3.9+
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Guido Martínez authored and Russell King committed Jun 26, 2014
1 parent 1860e37 commit 2e48cec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i2c/tda998x_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,6 @@ static void
tda998x_encoder_destroy(struct drm_encoder *encoder)
{
struct tda998x_priv *priv = to_tda998x_priv(encoder);
drm_i2c_encoder_destroy(encoder);

/* disable all IRQs and free the IRQ handler */
cec_write(priv, REG_CEC_RXSHPDINTENA, 0);
Expand All @@ -1193,6 +1192,7 @@ tda998x_encoder_destroy(struct drm_encoder *encoder)

if (priv->cec)
i2c_unregister_device(priv->cec);
drm_i2c_encoder_destroy(encoder);
kfree(priv);
}

Expand Down

0 comments on commit 2e48cec

Please sign in to comment.