drm/i2c: tda998x: move drm_i2c_encoder_destroy call
authorGuido Martínez <guido@vanguardiasur.com.ar>
Tue, 17 Jun 2014 14:17:03 +0000 (11:17 -0300)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 26 Jun 2014 09:52:03 +0000 (10:52 +0100)
commit2e48cecb55435e10c93c6aface1a1c7ef32f4e71
tree9e5823a8ddbf9f5918020d28be2ad223e7bf49f5
parent1860e379875dfe7271c649058aeddffe5afd9d0d
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>
drivers/gpu/drm/i2c/tda998x_drv.c