diff mbox series

[11/12] drm/i915/hdmi: Remove old i2c symlink

Message ID 20230829113920.13713-12-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: Populate connector->ddc always | expand

Commit Message

Ville Syrjälä Aug. 29, 2023, 11:39 a.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Remove the i915 specific i2c-N symlink from HDMI connectors.
This was added to sort of mirror the DP connectors that alreayd
had their aux ch based i2c adapter sitting beneath them in the
sysfs hierarchy. But now that we have the standard "ddc" symlink
approach provided by the core let's switch to that fully.
I don't think anything beyond igt depends on this.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_hdmi.c | 25 -----------------------
 1 file changed, 25 deletions(-)

Comments

Jani Nikula Aug. 31, 2023, 10:40 a.m. UTC | #1
On Tue, 29 Aug 2023, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Remove the i915 specific i2c-N symlink from HDMI connectors.
> This was added to sort of mirror the DP connectors that alreayd
> had their aux ch based i2c adapter sitting beneath them in the
> sysfs hierarchy. But now that we have the standard "ddc" symlink
> approach provided by the core let's switch to that fully.
> I don't think anything beyond igt depends on this.

I hope nobody notices or cares. I see that you've already fixed igt to
prefer ddc.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>


>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_hdmi.c | 25 -----------------------
>  1 file changed, 25 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> index 6b8754290304..e9dcd3d5f6e4 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> @@ -2544,28 +2544,6 @@ static int intel_hdmi_get_modes(struct drm_connector *connector)
>  	return drm_edid_connector_add_modes(connector);
>  }
>  
> -static void intel_hdmi_create_i2c_symlink(struct drm_connector *connector)
> -{
> -	struct drm_i915_private *i915 = to_i915(connector->dev);
> -	struct i2c_adapter *ddc = connector->ddc;
> -	struct kobject *i2c_kobj = &ddc->dev.kobj;
> -	struct kobject *connector_kobj = &connector->kdev->kobj;
> -	int ret;
> -
> -	ret = sysfs_create_link(connector_kobj, i2c_kobj, i2c_kobj->name);
> -	if (ret)
> -		drm_err(&i915->drm, "Failed to create i2c symlink (%d)\n", ret);
> -}
> -
> -static void intel_hdmi_remove_i2c_symlink(struct drm_connector *connector)
> -{
> -	struct i2c_adapter *ddc = connector->ddc;
> -	struct kobject *i2c_kobj = &ddc->dev.kobj;
> -	struct kobject *connector_kobj = &connector->kdev->kobj;
> -
> -	sysfs_remove_link(connector_kobj, i2c_kobj->name);
> -}
> -
>  static int
>  intel_hdmi_connector_register(struct drm_connector *connector)
>  {
> @@ -2575,8 +2553,6 @@ intel_hdmi_connector_register(struct drm_connector *connector)
>  	if (ret)
>  		return ret;
>  
> -	intel_hdmi_create_i2c_symlink(connector);
> -
>  	return ret;
>  }
>  
> @@ -2586,7 +2562,6 @@ static void intel_hdmi_connector_unregister(struct drm_connector *connector)
>  
>  	cec_notifier_conn_unregister(n);
>  
> -	intel_hdmi_remove_i2c_symlink(connector);
>  	intel_connector_unregister(connector);
>  }
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
index 6b8754290304..e9dcd3d5f6e4 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
@@ -2544,28 +2544,6 @@  static int intel_hdmi_get_modes(struct drm_connector *connector)
 	return drm_edid_connector_add_modes(connector);
 }
 
-static void intel_hdmi_create_i2c_symlink(struct drm_connector *connector)
-{
-	struct drm_i915_private *i915 = to_i915(connector->dev);
-	struct i2c_adapter *ddc = connector->ddc;
-	struct kobject *i2c_kobj = &ddc->dev.kobj;
-	struct kobject *connector_kobj = &connector->kdev->kobj;
-	int ret;
-
-	ret = sysfs_create_link(connector_kobj, i2c_kobj, i2c_kobj->name);
-	if (ret)
-		drm_err(&i915->drm, "Failed to create i2c symlink (%d)\n", ret);
-}
-
-static void intel_hdmi_remove_i2c_symlink(struct drm_connector *connector)
-{
-	struct i2c_adapter *ddc = connector->ddc;
-	struct kobject *i2c_kobj = &ddc->dev.kobj;
-	struct kobject *connector_kobj = &connector->kdev->kobj;
-
-	sysfs_remove_link(connector_kobj, i2c_kobj->name);
-}
-
 static int
 intel_hdmi_connector_register(struct drm_connector *connector)
 {
@@ -2575,8 +2553,6 @@  intel_hdmi_connector_register(struct drm_connector *connector)
 	if (ret)
 		return ret;
 
-	intel_hdmi_create_i2c_symlink(connector);
-
 	return ret;
 }
 
@@ -2586,7 +2562,6 @@  static void intel_hdmi_connector_unregister(struct drm_connector *connector)
 
 	cec_notifier_conn_unregister(n);
 
-	intel_hdmi_remove_i2c_symlink(connector);
 	intel_connector_unregister(connector);
 }