drm/i915: Don't destroy DRM properties in the driver
authorDamien Lespiau <damien.lespiau@intel.com>
Fri, 31 Oct 2014 14:39:12 +0000 (14:39 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 31 Oct 2014 17:38:17 +0000 (18:38 +0100)
When drm properties are created, they are added to mode_config.property_list,
which is then used in drm_mode_config_cleanup() to destroy every single
property created by the driver.

Cc: Chandra Konduru <chandra.konduru@intel.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_sdvo.c

index 9350edd6728d4706b82d13f1133ad22e09a0708b..6d7a277458b5cf0f24a3e97f2b60463f75585d2e 100644 (file)
@@ -1991,57 +1991,10 @@ static int intel_sdvo_get_modes(struct drm_connector *connector)
        return !list_empty(&connector->probed_modes);
 }
 
-static void
-intel_sdvo_destroy_enhance_property(struct drm_connector *connector)
-{
-       struct intel_sdvo_connector *intel_sdvo_connector = to_intel_sdvo_connector(connector);
-       struct drm_device *dev = connector->dev;
-
-       if (intel_sdvo_connector->left)
-               drm_property_destroy(dev, intel_sdvo_connector->left);
-       if (intel_sdvo_connector->right)
-               drm_property_destroy(dev, intel_sdvo_connector->right);
-       if (intel_sdvo_connector->top)
-               drm_property_destroy(dev, intel_sdvo_connector->top);
-       if (intel_sdvo_connector->bottom)
-               drm_property_destroy(dev, intel_sdvo_connector->bottom);
-       if (intel_sdvo_connector->hpos)
-               drm_property_destroy(dev, intel_sdvo_connector->hpos);
-       if (intel_sdvo_connector->vpos)
-               drm_property_destroy(dev, intel_sdvo_connector->vpos);
-       if (intel_sdvo_connector->saturation)
-               drm_property_destroy(dev, intel_sdvo_connector->saturation);
-       if (intel_sdvo_connector->contrast)
-               drm_property_destroy(dev, intel_sdvo_connector->contrast);
-       if (intel_sdvo_connector->hue)
-               drm_property_destroy(dev, intel_sdvo_connector->hue);
-       if (intel_sdvo_connector->sharpness)
-               drm_property_destroy(dev, intel_sdvo_connector->sharpness);
-       if (intel_sdvo_connector->flicker_filter)
-               drm_property_destroy(dev, intel_sdvo_connector->flicker_filter);
-       if (intel_sdvo_connector->flicker_filter_2d)
-               drm_property_destroy(dev, intel_sdvo_connector->flicker_filter_2d);
-       if (intel_sdvo_connector->flicker_filter_adaptive)
-               drm_property_destroy(dev, intel_sdvo_connector->flicker_filter_adaptive);
-       if (intel_sdvo_connector->tv_luma_filter)
-               drm_property_destroy(dev, intel_sdvo_connector->tv_luma_filter);
-       if (intel_sdvo_connector->tv_chroma_filter)
-               drm_property_destroy(dev, intel_sdvo_connector->tv_chroma_filter);
-       if (intel_sdvo_connector->dot_crawl)
-               drm_property_destroy(dev, intel_sdvo_connector->dot_crawl);
-       if (intel_sdvo_connector->brightness)
-               drm_property_destroy(dev, intel_sdvo_connector->brightness);
-}
-
 static void intel_sdvo_destroy(struct drm_connector *connector)
 {
        struct intel_sdvo_connector *intel_sdvo_connector = to_intel_sdvo_connector(connector);
 
-       if (intel_sdvo_connector->tv_format)
-               drm_property_destroy(connector->dev,
-                                    intel_sdvo_connector->tv_format);
-
-       intel_sdvo_destroy_enhance_property(connector);
        drm_connector_cleanup(connector);
        kfree(intel_sdvo_connector);
 }