diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-11-24 16:13:23 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-12-07 19:22:44 -0500 |
commit | ffd09c648a76a1cf96872c033e98d4730f9b10a4 (patch) | |
tree | ac9a51698987a7f5b794a7bdaba15fe647fe58d0 | |
parent | 5801ead6bd6bddf5505d6eab55f84d8ee8106cd8 (diff) |
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.c | 19 |
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 3837cc942617..9c57633a4f45 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 = { | |||
896 | .force = radeon_dvi_force, | 896 | .force = radeon_dvi_force, |
897 | }; | 897 | }; |
898 | 898 | ||
899 | static void radeon_dp_connector_destroy(struct drm_connector *connector) | ||
900 | { | ||
901 | struct radeon_connector *radeon_connector = to_radeon_connector(connector); | ||
902 | struct radeon_connector_atom_dig *radeon_dig_connector = radeon_connector->con_priv; | ||
903 | |||
904 | if (radeon_connector->ddc_bus) | ||
905 | radeon_i2c_destroy(radeon_connector->ddc_bus); | ||
906 | if (radeon_connector->edid) | ||
907 | kfree(radeon_connector->edid); | ||
908 | if (radeon_dig_connector->dp_i2c_bus) | ||
909 | radeon_i2c_destroy(radeon_dig_connector->dp_i2c_bus); | ||
910 | kfree(radeon_connector->con_priv); | ||
911 | drm_sysfs_connector_remove(connector); | ||
912 | drm_connector_cleanup(connector); | ||
913 | kfree(connector); | ||
914 | } | ||
915 | |||
899 | static int radeon_dp_get_modes(struct drm_connector *connector) | 916 | static int radeon_dp_get_modes(struct drm_connector *connector) |
900 | { | 917 | { |
901 | struct radeon_connector *radeon_connector = to_radeon_connector(connector); | 918 | struct radeon_connector *radeon_connector = to_radeon_connector(connector); |
@@ -959,7 +976,7 @@ struct drm_connector_funcs radeon_dp_connector_funcs = { | |||
959 | .detect = radeon_dp_detect, | 976 | .detect = radeon_dp_detect, |
960 | .fill_modes = drm_helper_probe_single_connector_modes, | 977 | .fill_modes = drm_helper_probe_single_connector_modes, |
961 | .set_property = radeon_connector_set_property, | 978 | .set_property = radeon_connector_set_property, |
962 | .destroy = radeon_connector_destroy, | 979 | .destroy = radeon_dp_connector_destroy, |
963 | .force = radeon_dvi_force, | 980 | .force = radeon_dvi_force, |
964 | }; | 981 | }; |
965 | 982 | ||