diff options
author | Jani Nikula <jani.nikula@intel.com> | 2014-06-03 07:56:18 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-06-03 23:14:41 -0400 |
commit | 8c6c361ac6490eb3b74593a85ef5ea7d86a8669f (patch) | |
tree | f1e2e72ce03eb74edbc3b417014e40e2f8a9c16c /drivers | |
parent | c23cc4178dd1b8ffa8b47b0df14b2525293aa4b1 (diff) |
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: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/nouveau/dispnv04/dac.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/dispnv04/dfp.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/dispnv04/disp.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/dispnv04/tvnv04.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/dispnv04/tvnv17.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_connector.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_display.c | 2 |
7 files changed, 11 insertions, 11 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv04/dac.c b/drivers/gpu/drm/nouveau/dispnv04/dac.c index 434b920f6bd4..a96dda48718e 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/dac.c +++ b/drivers/gpu/drm/nouveau/dispnv04/dac.c | |||
@@ -414,7 +414,7 @@ static void nv04_dac_commit(struct drm_encoder *encoder) | |||
414 | helper->dpms(encoder, DRM_MODE_DPMS_ON); | 414 | helper->dpms(encoder, DRM_MODE_DPMS_ON); |
415 | 415 | ||
416 | NV_DEBUG(drm, "Output %s is running on CRTC %d using output %c\n", | 416 | NV_DEBUG(drm, "Output %s is running on CRTC %d using output %c\n", |
417 | drm_get_connector_name(&nouveau_encoder_connector_get(nv_encoder)->base), | 417 | nouveau_encoder_connector_get(nv_encoder)->base.name, |
418 | nv_crtc->index, '@' + ffs(nv_encoder->dcb->or)); | 418 | nv_crtc->index, '@' + ffs(nv_encoder->dcb->or)); |
419 | } | 419 | } |
420 | 420 | ||
diff --git a/drivers/gpu/drm/nouveau/dispnv04/dfp.c b/drivers/gpu/drm/nouveau/dispnv04/dfp.c index a2d669b4acf2..e57babb206d3 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/dfp.c +++ b/drivers/gpu/drm/nouveau/dispnv04/dfp.c | |||
@@ -477,7 +477,7 @@ static void nv04_dfp_commit(struct drm_encoder *encoder) | |||
477 | helper->dpms(encoder, DRM_MODE_DPMS_ON); | 477 | helper->dpms(encoder, DRM_MODE_DPMS_ON); |
478 | 478 | ||
479 | NV_DEBUG(drm, "Output %s is running on CRTC %d using output %c\n", | 479 | NV_DEBUG(drm, "Output %s is running on CRTC %d using output %c\n", |
480 | drm_get_connector_name(&nouveau_encoder_connector_get(nv_encoder)->base), | 480 | nouveau_encoder_connector_get(nv_encoder)->base.name, |
481 | nv_crtc->index, '@' + ffs(nv_encoder->dcb->or)); | 481 | nv_crtc->index, '@' + ffs(nv_encoder->dcb->or)); |
482 | } | 482 | } |
483 | 483 | ||
diff --git a/drivers/gpu/drm/nouveau/dispnv04/disp.c b/drivers/gpu/drm/nouveau/dispnv04/disp.c index 2f1ed61f7c8c..4342fdaee707 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/disp.c +++ b/drivers/gpu/drm/nouveau/dispnv04/disp.c | |||
@@ -115,7 +115,7 @@ nv04_display_create(struct drm_device *dev) | |||
115 | &dev->mode_config.connector_list, head) { | 115 | &dev->mode_config.connector_list, head) { |
116 | if (!connector->encoder_ids[0]) { | 116 | if (!connector->encoder_ids[0]) { |
117 | NV_WARN(drm, "%s has no encoders, removing\n", | 117 | NV_WARN(drm, "%s has no encoders, removing\n", |
118 | drm_get_connector_name(connector)); | 118 | connector->name); |
119 | connector->funcs->destroy(connector); | 119 | connector->funcs->destroy(connector); |
120 | } | 120 | } |
121 | } | 121 | } |
diff --git a/drivers/gpu/drm/nouveau/dispnv04/tvnv04.c b/drivers/gpu/drm/nouveau/dispnv04/tvnv04.c index 244822df8ffc..8667620b703a 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/tvnv04.c +++ b/drivers/gpu/drm/nouveau/dispnv04/tvnv04.c | |||
@@ -171,7 +171,8 @@ static void nv04_tv_commit(struct drm_encoder *encoder) | |||
171 | helper->dpms(encoder, DRM_MODE_DPMS_ON); | 171 | helper->dpms(encoder, DRM_MODE_DPMS_ON); |
172 | 172 | ||
173 | NV_DEBUG(drm, "Output %s is running on CRTC %d using output %c\n", | 173 | NV_DEBUG(drm, "Output %s is running on CRTC %d using output %c\n", |
174 | drm_get_connector_name(&nouveau_encoder_connector_get(nv_encoder)->base), nv_crtc->index, '@' + ffs(nv_encoder->dcb->or)); | 174 | nouveau_encoder_connector_get(nv_encoder)->base.name, |
175 | nv_crtc->index, '@' + ffs(nv_encoder->dcb->or)); | ||
175 | } | 176 | } |
176 | 177 | ||
177 | static void nv04_tv_destroy(struct drm_encoder *encoder) | 178 | static void nv04_tv_destroy(struct drm_encoder *encoder) |
diff --git a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c index acef48f4a4ea..195bd8e86c6a 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c +++ b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c | |||
@@ -612,8 +612,7 @@ static void nv17_tv_commit(struct drm_encoder *encoder) | |||
612 | helper->dpms(encoder, DRM_MODE_DPMS_ON); | 612 | helper->dpms(encoder, DRM_MODE_DPMS_ON); |
613 | 613 | ||
614 | NV_INFO(drm, "Output %s is running on CRTC %d using output %c\n", | 614 | NV_INFO(drm, "Output %s is running on CRTC %d using output %c\n", |
615 | drm_get_connector_name( | 615 | nouveau_encoder_connector_get(nv_encoder)->base.name, |
616 | &nouveau_encoder_connector_get(nv_encoder)->base), | ||
617 | nv_crtc->index, '@' + ffs(nv_encoder->dcb->or)); | 616 | nv_crtc->index, '@' + ffs(nv_encoder->dcb->or)); |
618 | } | 617 | } |
619 | 618 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c index d07ce028af51..6ecea9b2b15a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_connector.c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c | |||
@@ -265,14 +265,14 @@ nouveau_connector_detect(struct drm_connector *connector, bool force) | |||
265 | nv_connector->edid); | 265 | nv_connector->edid); |
266 | if (!nv_connector->edid) { | 266 | if (!nv_connector->edid) { |
267 | NV_ERROR(drm, "DDC responded, but no EDID for %s\n", | 267 | NV_ERROR(drm, "DDC responded, but no EDID for %s\n", |
268 | drm_get_connector_name(connector)); | 268 | connector->name); |
269 | goto detect_analog; | 269 | goto detect_analog; |
270 | } | 270 | } |
271 | 271 | ||
272 | if (nv_encoder->dcb->type == DCB_OUTPUT_DP && | 272 | if (nv_encoder->dcb->type == DCB_OUTPUT_DP && |
273 | !nouveau_dp_detect(to_drm_encoder(nv_encoder))) { | 273 | !nouveau_dp_detect(to_drm_encoder(nv_encoder))) { |
274 | NV_ERROR(drm, "Detected %s, but failed init\n", | 274 | NV_ERROR(drm, "Detected %s, but failed init\n", |
275 | drm_get_connector_name(connector)); | 275 | connector->name); |
276 | conn_status = connector_status_disconnected; | 276 | conn_status = connector_status_disconnected; |
277 | goto out; | 277 | goto out; |
278 | } | 278 | } |
@@ -437,7 +437,7 @@ nouveau_connector_force(struct drm_connector *connector) | |||
437 | nv_encoder = find_encoder(connector, type); | 437 | nv_encoder = find_encoder(connector, type); |
438 | if (!nv_encoder) { | 438 | if (!nv_encoder) { |
439 | NV_ERROR(drm, "can't find encoder to force %s on!\n", | 439 | NV_ERROR(drm, "can't find encoder to force %s on!\n", |
440 | drm_get_connector_name(connector)); | 440 | connector->name); |
441 | connector->status = connector_status_disconnected; | 441 | connector->status = connector_status_disconnected; |
442 | return; | 442 | return; |
443 | } | 443 | } |
@@ -923,7 +923,7 @@ nouveau_connector_hotplug_work(struct work_struct *work) | |||
923 | bool plugged = gpio->get(gpio, 0, nv_connector->hpd.func, 0xff); | 923 | bool plugged = gpio->get(gpio, 0, nv_connector->hpd.func, 0xff); |
924 | 924 | ||
925 | NV_DEBUG(drm, "%splugged %s\n", plugged ? "" : "un", | 925 | NV_DEBUG(drm, "%splugged %s\n", plugged ? "" : "un", |
926 | drm_get_connector_name(connector)); | 926 | connector->name); |
927 | 927 | ||
928 | if (plugged) | 928 | if (plugged) |
929 | drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON); | 929 | drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON); |
diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c index 58af547b0b93..79f6dc724a85 100644 --- a/drivers/gpu/drm/nouveau/nv50_display.c +++ b/drivers/gpu/drm/nouveau/nv50_display.c | |||
@@ -2295,7 +2295,7 @@ nv50_display_create(struct drm_device *dev) | |||
2295 | continue; | 2295 | continue; |
2296 | 2296 | ||
2297 | NV_WARN(drm, "%s has no encoders, removing\n", | 2297 | NV_WARN(drm, "%s has no encoders, removing\n", |
2298 | drm_get_connector_name(connector)); | 2298 | connector->name); |
2299 | connector->funcs->destroy(connector); | 2299 | connector->funcs->destroy(connector); |
2300 | } | 2300 | } |
2301 | 2301 | ||