summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-11-24 16:13:23 -0500
committerDave Airlie <airlied@redhat.com>2009-12-08 10:22:44 +1000
commitffd09c648a76a1cf96872c033e98d4730f9b10a4 (patch)
treeac9a51698987a7f5b794a7bdaba15fe647fe58d0
parent5801ead6bd6bddf5505d6eab55f84d8ee8106cd8 (diff)
downloadop-kernel-dev-ffd09c648a76a1cf96872c033e98d4730f9b10a4.zip
op-kernel-dev-ffd09c648a76a1cf96872c033e98d4730f9b10a4.tar.gz
drm/radeon/kms: free aux channel i2c adapter on destroy
Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/radeon/radeon_connectors.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
index 3837cc9..9c57633 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -896,6 +896,23 @@ struct drm_connector_funcs radeon_dvi_connector_funcs = {
.force = radeon_dvi_force,
};
+static void radeon_dp_connector_destroy(struct drm_connector *connector)
+{
+ struct radeon_connector *radeon_connector = to_radeon_connector(connector);
+ struct radeon_connector_atom_dig *radeon_dig_connector = radeon_connector->con_priv;
+
+ if (radeon_connector->ddc_bus)
+ radeon_i2c_destroy(radeon_connector->ddc_bus);
+ if (radeon_connector->edid)
+ kfree(radeon_connector->edid);
+ if (radeon_dig_connector->dp_i2c_bus)
+ radeon_i2c_destroy(radeon_dig_connector->dp_i2c_bus);
+ kfree(radeon_connector->con_priv);
+ drm_sysfs_connector_remove(connector);
+ drm_connector_cleanup(connector);
+ kfree(connector);
+}
+
static int radeon_dp_get_modes(struct drm_connector *connector)
{
struct radeon_connector *radeon_connector = to_radeon_connector(connector);
@@ -959,7 +976,7 @@ struct drm_connector_funcs radeon_dp_connector_funcs = {
.detect = radeon_dp_detect,
.fill_modes = drm_helper_probe_single_connector_modes,
.set_property = radeon_connector_set_property,
- .destroy = radeon_connector_destroy,
+ .destroy = radeon_dp_connector_destroy,
.force = radeon_dvi_force,
};
OpenPOWER on IntegriCloud