/* This should be called from the @destroy method of an I2C slave encoder driver once I2C access is no longer needed.  */
void drm_i2c_encoder_destroy(struct drm_encoder *drm_encoder)
/* This should be called from the @destroy method of an I2C slave encoder driver once I2C access is no longer needed.  */
void drm_i2c_encoder_destroy(struct drm_encoder *drm_encoder)
{
	struct drm_encoder_slave *encoder = to_encoder_slave(drm_encoder);
	struct i2c_client *client = drm_i2c_encoder_get_client(drm_encoder);
	struct module *module = client->driver->driver.owner;
	i2c_unregister_device(client);
	encoder->bus_priv = NULL;
	module_put(module);
}