diff options
author | Guido Martínez <guido@vanguardiasur.com.ar> | 2014-06-17 10:17:03 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-06-26 05:52:03 -0400 |
commit | 2e48cecb55435e10c93c6aface1a1c7ef32f4e71 (patch) | |
tree | 9e5823a8ddbf9f5918020d28be2ad223e7bf49f5 /drivers/gpu/drm/i2c | |
parent | 1860e379875dfe7271c649058aeddffe5afd9d0d (diff) |
drm/i2c: tda998x: move drm_i2c_encoder_destroy call
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>
Diffstat (limited to 'drivers/gpu/drm/i2c')
-rw-r--r-- | drivers/gpu/drm/i2c/tda998x_drv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c index 48af5cac1902..b98c969aeffa 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c | |||
@@ -1183,7 +1183,6 @@ static void | |||
1183 | tda998x_encoder_destroy(struct drm_encoder *encoder) | 1183 | tda998x_encoder_destroy(struct drm_encoder *encoder) |
1184 | { | 1184 | { |
1185 | struct tda998x_priv *priv = to_tda998x_priv(encoder); | 1185 | struct tda998x_priv *priv = to_tda998x_priv(encoder); |
1186 | drm_i2c_encoder_destroy(encoder); | ||
1187 | 1186 | ||
1188 | /* disable all IRQs and free the IRQ handler */ | 1187 | /* disable all IRQs and free the IRQ handler */ |
1189 | cec_write(priv, REG_CEC_RXSHPDINTENA, 0); | 1188 | cec_write(priv, REG_CEC_RXSHPDINTENA, 0); |
@@ -1193,6 +1192,7 @@ tda998x_encoder_destroy(struct drm_encoder *encoder) | |||
1193 | 1192 | ||
1194 | if (priv->cec) | 1193 | if (priv->cec) |
1195 | i2c_unregister_device(priv->cec); | 1194 | i2c_unregister_device(priv->cec); |
1195 | drm_i2c_encoder_destroy(encoder); | ||
1196 | kfree(priv); | 1196 | kfree(priv); |
1197 | } | 1197 | } |
1198 | 1198 | ||