Commit 8c6c361a authored by Jani Nikula's avatar Jani Nikula Committed by Dave Airlie

drm/nouveau: replace drm_get_connector_name() with direct name field use

Generated using semantic patches:

@@
expression E;
@@

- drm_get_connector_name(&E)
+ E.name

@@
expression E;
@@

- drm_get_connector_name(E)
+ E->name

v2: Turn drm_get_connector_name(&E) into E.name instead of &(E)->name.
Acked-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent c23cc417
...@@ -414,7 +414,7 @@ static void nv04_dac_commit(struct drm_encoder *encoder) ...@@ -414,7 +414,7 @@ static void nv04_dac_commit(struct drm_encoder *encoder)
helper->dpms(encoder, DRM_MODE_DPMS_ON); helper->dpms(encoder, DRM_MODE_DPMS_ON);
NV_DEBUG(drm, "Output %s is running on CRTC %d using output %c\n", NV_DEBUG(drm, "Output %s is running on CRTC %d using output %c\n",
drm_get_connector_name(&nouveau_encoder_connector_get(nv_encoder)->base), nouveau_encoder_connector_get(nv_encoder)->base.name,
nv_crtc->index, '@' + ffs(nv_encoder->dcb->or)); nv_crtc->index, '@' + ffs(nv_encoder->dcb->or));
} }
......
...@@ -477,7 +477,7 @@ static void nv04_dfp_commit(struct drm_encoder *encoder) ...@@ -477,7 +477,7 @@ static void nv04_dfp_commit(struct drm_encoder *encoder)
helper->dpms(encoder, DRM_MODE_DPMS_ON); helper->dpms(encoder, DRM_MODE_DPMS_ON);
NV_DEBUG(drm, "Output %s is running on CRTC %d using output %c\n", NV_DEBUG(drm, "Output %s is running on CRTC %d using output %c\n",
drm_get_connector_name(&nouveau_encoder_connector_get(nv_encoder)->base), nouveau_encoder_connector_get(nv_encoder)->base.name,
nv_crtc->index, '@' + ffs(nv_encoder->dcb->or)); nv_crtc->index, '@' + ffs(nv_encoder->dcb->or));
} }
......
...@@ -115,7 +115,7 @@ nv04_display_create(struct drm_device *dev) ...@@ -115,7 +115,7 @@ nv04_display_create(struct drm_device *dev)
&dev->mode_config.connector_list, head) { &dev->mode_config.connector_list, head) {
if (!connector->encoder_ids[0]) { if (!connector->encoder_ids[0]) {
NV_WARN(drm, "%s has no encoders, removing\n", NV_WARN(drm, "%s has no encoders, removing\n",
drm_get_connector_name(connector)); connector->name);
connector->funcs->destroy(connector); connector->funcs->destroy(connector);
} }
} }
......
...@@ -171,7 +171,8 @@ static void nv04_tv_commit(struct drm_encoder *encoder) ...@@ -171,7 +171,8 @@ static void nv04_tv_commit(struct drm_encoder *encoder)
helper->dpms(encoder, DRM_MODE_DPMS_ON); helper->dpms(encoder, DRM_MODE_DPMS_ON);
NV_DEBUG(drm, "Output %s is running on CRTC %d using output %c\n", NV_DEBUG(drm, "Output %s is running on CRTC %d using output %c\n",
drm_get_connector_name(&nouveau_encoder_connector_get(nv_encoder)->base), nv_crtc->index, '@' + ffs(nv_encoder->dcb->or)); nouveau_encoder_connector_get(nv_encoder)->base.name,
nv_crtc->index, '@' + ffs(nv_encoder->dcb->or));
} }
static void nv04_tv_destroy(struct drm_encoder *encoder) static void nv04_tv_destroy(struct drm_encoder *encoder)
......
...@@ -612,8 +612,7 @@ static void nv17_tv_commit(struct drm_encoder *encoder) ...@@ -612,8 +612,7 @@ static void nv17_tv_commit(struct drm_encoder *encoder)
helper->dpms(encoder, DRM_MODE_DPMS_ON); helper->dpms(encoder, DRM_MODE_DPMS_ON);
NV_INFO(drm, "Output %s is running on CRTC %d using output %c\n", NV_INFO(drm, "Output %s is running on CRTC %d using output %c\n",
drm_get_connector_name( nouveau_encoder_connector_get(nv_encoder)->base.name,
&nouveau_encoder_connector_get(nv_encoder)->base),
nv_crtc->index, '@' + ffs(nv_encoder->dcb->or)); nv_crtc->index, '@' + ffs(nv_encoder->dcb->or));
} }
......
...@@ -265,14 +265,14 @@ nouveau_connector_detect(struct drm_connector *connector, bool force) ...@@ -265,14 +265,14 @@ nouveau_connector_detect(struct drm_connector *connector, bool force)
nv_connector->edid); nv_connector->edid);
if (!nv_connector->edid) { if (!nv_connector->edid) {
NV_ERROR(drm, "DDC responded, but no EDID for %s\n", NV_ERROR(drm, "DDC responded, but no EDID for %s\n",
drm_get_connector_name(connector)); connector->name);
goto detect_analog; goto detect_analog;
} }
if (nv_encoder->dcb->type == DCB_OUTPUT_DP && if (nv_encoder->dcb->type == DCB_OUTPUT_DP &&
!nouveau_dp_detect(to_drm_encoder(nv_encoder))) { !nouveau_dp_detect(to_drm_encoder(nv_encoder))) {
NV_ERROR(drm, "Detected %s, but failed init\n", NV_ERROR(drm, "Detected %s, but failed init\n",
drm_get_connector_name(connector)); connector->name);
conn_status = connector_status_disconnected; conn_status = connector_status_disconnected;
goto out; goto out;
} }
...@@ -437,7 +437,7 @@ nouveau_connector_force(struct drm_connector *connector) ...@@ -437,7 +437,7 @@ nouveau_connector_force(struct drm_connector *connector)
nv_encoder = find_encoder(connector, type); nv_encoder = find_encoder(connector, type);
if (!nv_encoder) { if (!nv_encoder) {
NV_ERROR(drm, "can't find encoder to force %s on!\n", NV_ERROR(drm, "can't find encoder to force %s on!\n",
drm_get_connector_name(connector)); connector->name);
connector->status = connector_status_disconnected; connector->status = connector_status_disconnected;
return; return;
} }
...@@ -923,7 +923,7 @@ nouveau_connector_hotplug_work(struct work_struct *work) ...@@ -923,7 +923,7 @@ nouveau_connector_hotplug_work(struct work_struct *work)
bool plugged = gpio->get(gpio, 0, nv_connector->hpd.func, 0xff); bool plugged = gpio->get(gpio, 0, nv_connector->hpd.func, 0xff);
NV_DEBUG(drm, "%splugged %s\n", plugged ? "" : "un", NV_DEBUG(drm, "%splugged %s\n", plugged ? "" : "un",
drm_get_connector_name(connector)); connector->name);
if (plugged) if (plugged)
drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON); drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON);
......
...@@ -2295,7 +2295,7 @@ nv50_display_create(struct drm_device *dev) ...@@ -2295,7 +2295,7 @@ nv50_display_create(struct drm_device *dev)
continue; continue;
NV_WARN(drm, "%s has no encoders, removing\n", NV_WARN(drm, "%s has no encoders, removing\n",
drm_get_connector_name(connector)); connector->name);
connector->funcs->destroy(connector); connector->funcs->destroy(connector);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment