diff mbox

[1/3] drm/sysfs: Remove stale comments about calling drm_sysfs_connector_add() multiple times

Message ID 1383592728-20851-2-git-send-email-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ville Syrjälä Nov. 4, 2013, 7:18 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

drm_connector_sysfs_add() explicitly checks if connector->kdev
is already populated and returns success. So it clearly now allows
being called multiple times. Remove some stale comments to the contrary.

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

Comments

Jani Nikula Nov. 5, 2013, 7:07 a.m. UTC | #1
On Mon, 04 Nov 2013, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> drm_connector_sysfs_add() explicitly checks if connector->kdev
> is already populated and returns success. So it clearly now allows
> being called multiple times. Remove some stale comments to the contrary.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

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

> ---
>  drivers/gpu/drm/drm_sysfs.c | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
> index db1c8f9..1a35ea5 100644
> --- a/drivers/gpu/drm/drm_sysfs.c
> +++ b/drivers/gpu/drm/drm_sysfs.c
> @@ -366,11 +366,6 @@ static struct bin_attribute edid_attr = {
>   * properties (so far, connection status, dpms, mode list & edid) and
>   * generate a hotplug event so userspace knows there's a new connector
>   * available.
> - *
> - * Note:
> - * This routine should only be called *once* for each registered connector.
> - * A second call for an already registered connector will trigger the BUG_ON
> - * below.
>   */
>  int drm_sysfs_connector_add(struct drm_connector *connector)
>  {
> @@ -383,7 +378,6 @@ int drm_sysfs_connector_add(struct drm_connector *connector)
>  	if (connector->kdev)
>  		return 0;
>  
> -	/* We shouldn't get called more than once for the same connector */
>  	connector->kdev = device_create(drm_class, dev->primary->kdev,
>  					0, connector, "card%d-%s",
>  					dev->primary->index, drm_get_connector_name(connector));
> -- 
> 1.8.1.5
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
index db1c8f9..1a35ea5 100644
--- a/drivers/gpu/drm/drm_sysfs.c
+++ b/drivers/gpu/drm/drm_sysfs.c
@@ -366,11 +366,6 @@  static struct bin_attribute edid_attr = {
  * properties (so far, connection status, dpms, mode list & edid) and
  * generate a hotplug event so userspace knows there's a new connector
  * available.
- *
- * Note:
- * This routine should only be called *once* for each registered connector.
- * A second call for an already registered connector will trigger the BUG_ON
- * below.
  */
 int drm_sysfs_connector_add(struct drm_connector *connector)
 {
@@ -383,7 +378,6 @@  int drm_sysfs_connector_add(struct drm_connector *connector)
 	if (connector->kdev)
 		return 0;
 
-	/* We shouldn't get called more than once for the same connector */
 	connector->kdev = device_create(drm_class, dev->primary->kdev,
 					0, connector, "card%d-%s",
 					dev->primary->index, drm_get_connector_name(connector));