drm/nouveau: replace drm_get_connector_name() with direct name field use
authorJani Nikula <jani.nikula@intel.com>
Tue, 3 Jun 2014 11:56:18 +0000 (14:56 +0300)
committerDave Airlie <airlied@redhat.com>
Wed, 4 Jun 2014 03:14:41 +0000 (13:14 +1000)
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>
drivers/gpu/drm/nouveau/dispnv04/dac.c
drivers/gpu/drm/nouveau/dispnv04/dfp.c
drivers/gpu/drm/nouveau/dispnv04/disp.c
drivers/gpu/drm/nouveau/dispnv04/tvnv04.c
drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
drivers/gpu/drm/nouveau/nouveau_connector.c
drivers/gpu/drm/nouveau/nv50_display.c

index 434b920f6bd4d052dc1a50fc4be9d34f58d955c9..a96dda48718e6bb42f19fa639d8d16a8679ceb9b 100644 (file)
@@ -414,7 +414,7 @@ static void nv04_dac_commit(struct drm_encoder *encoder)
        helper->dpms(encoder, DRM_MODE_DPMS_ON);
 
        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));
 }
 
index a2d669b4acf2452d86b32403936fb42bfaa7b11f..e57babb206d3c6202d2f9f6d2537fed979a13ed0 100644 (file)
@@ -477,7 +477,7 @@ static void nv04_dfp_commit(struct drm_encoder *encoder)
        helper->dpms(encoder, DRM_MODE_DPMS_ON);
 
        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));
 }
 
index 2f1ed61f7c8c9e39d44c1528410eb4aaeb83fe17..4342fdaee707f252f12908b644bde7afab656fc8 100644 (file)
@@ -115,7 +115,7 @@ nv04_display_create(struct drm_device *dev)
                                 &dev->mode_config.connector_list, head) {
                if (!connector->encoder_ids[0]) {
                        NV_WARN(drm, "%s has no encoders, removing\n",
-                               drm_get_connector_name(connector));
+                               connector->name);
                        connector->funcs->destroy(connector);
                }
        }
index 244822df8ffc73d1e9f15075c7ee6faa54368a84..8667620b703a3262baa4168868e42bf3680fe809 100644 (file)
@@ -171,7 +171,8 @@ static void nv04_tv_commit(struct drm_encoder *encoder)
        helper->dpms(encoder, DRM_MODE_DPMS_ON);
 
        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)
index acef48f4a4ea2c62c75172ae38fb7f85646d39fa..195bd8e86c6a523615679273bf71bc4fbc5aa6cc 100644 (file)
@@ -612,8 +612,7 @@ static void nv17_tv_commit(struct drm_encoder *encoder)
        helper->dpms(encoder, DRM_MODE_DPMS_ON);
 
        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),
+               nouveau_encoder_connector_get(nv_encoder)->base.name,
                nv_crtc->index, '@' + ffs(nv_encoder->dcb->or));
 }
 
index d07ce028af516ace0b20db1418a7f9ed14b78c31..6ecea9b2b15aca7e4840156cb8bf287f10243d0d 100644 (file)
@@ -265,14 +265,14 @@ nouveau_connector_detect(struct drm_connector *connector, bool force)
                                                        nv_connector->edid);
                if (!nv_connector->edid) {
                        NV_ERROR(drm, "DDC responded, but no EDID for %s\n",
-                                drm_get_connector_name(connector));
+                                connector->name);
                        goto detect_analog;
                }
 
                if (nv_encoder->dcb->type == DCB_OUTPUT_DP &&
                    !nouveau_dp_detect(to_drm_encoder(nv_encoder))) {
                        NV_ERROR(drm, "Detected %s, but failed init\n",
-                                drm_get_connector_name(connector));
+                                connector->name);
                        conn_status = connector_status_disconnected;
                        goto out;
                }
@@ -437,7 +437,7 @@ nouveau_connector_force(struct drm_connector *connector)
        nv_encoder = find_encoder(connector, type);
        if (!nv_encoder) {
                NV_ERROR(drm, "can't find encoder to force %s on!\n",
-                        drm_get_connector_name(connector));
+                        connector->name);
                connector->status = connector_status_disconnected;
                return;
        }
@@ -923,7 +923,7 @@ nouveau_connector_hotplug_work(struct work_struct *work)
        bool plugged = gpio->get(gpio, 0, nv_connector->hpd.func, 0xff);
 
        NV_DEBUG(drm, "%splugged %s\n", plugged ? "" : "un",
-                drm_get_connector_name(connector));
+                connector->name);
 
        if (plugged)
                drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON);
index 58af547b0b930e2ea64e74b0966c7a81e11fba54..79f6dc724a85f749c66ee1411a2aac7c00daf644 100644 (file)
@@ -2295,7 +2295,7 @@ nv50_display_create(struct drm_device *dev)
                        continue;
 
                NV_WARN(drm, "%s has no encoders, removing\n",
-                       drm_get_connector_name(connector));
+                       connector->name);
                connector->funcs->destroy(connector);
        }