Re: [PATCH] drm/i915: fix dp/sdvo i2c cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 24, 2014 at 11:15:55AM +0200, Imre Deak wrote:
> Atm we try to remove the connector's i2c sysfs entry too late in the
> encoder's destroy callback. By that time the kobject used as the parent
> for all connector sysfs entries is already removed when we do an early
> removal of all connector sysfs entries in intel_modeset_cleanup(). Fix
> this by adding an early_destory encoder callback, where we remove the
                         ^destroy
> encoder's i2c adapter.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70523
> 
> Signed-off-by: Imre Deak <imre.deak@xxxxxxxxx>
> ---

> +void intel_dp_encoder_early_destroy(struct intel_encoder *intel_encoder)
static void intel_dp_encoder_early_destroy(struct intel_encoder *intel_encoder)

> +{
> +	struct intel_dp *intel_dp = enc_to_intel_dp(&intel_encoder->base);
> +
> +	i2c_del_adapter(&intel_dp->adapter);

Sigh. ->adapter is too generic, as there are quite a few things
associated with the link that may be called adapter.

> +}
> +
>  static const struct drm_connector_funcs intel_dp_connector_funcs = {
>  	.dpms = intel_connector_dpms,
>  	.detect = intel_dp_detect,
> @@ -3880,6 +3887,7 @@ intel_dp_init(struct drm_device *dev, int output_reg, enum port port)
>  		intel_encoder->pre_enable = g4x_pre_enable_dp;
>  		intel_encoder->enable = g4x_enable_dp;
>  	}

> +static void intel_sdvo_early_destroy(struct intel_encoder *intel_encoder)
> +{
> +	struct intel_sdvo *intel_sdvo;
> +
> +	intel_sdvo = container_of(intel_encoder, struct intel_sdvo, base);

struct intel_sdvo *intel_sdvo = to_sdvo(intel_encoder);

> +	i2c_del_adapter(&intel_sdvo->ddc);
> +}

The intel_prefix is redundant in these cases as there is no confusion
with a generic drm_sdvo or drm_dp.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux