drm/i915: 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>
This commit is contained in:
Jani Nikula 2014-06-03 14:56:17 +03:00 коммит произвёл Dave Airlie
Родитель 4a2a450fe2
Коммит c23cc4178d
12 изменённых файлов: 31 добавлений и 31 удалений

Просмотреть файл

@ -2202,7 +2202,7 @@ static void intel_encoder_info(struct seq_file *m,
struct drm_connector *connector = &intel_connector->base; struct drm_connector *connector = &intel_connector->base;
seq_printf(m, "\t\tconnector %d: type: %s, status: %s", seq_printf(m, "\t\tconnector %d: type: %s, status: %s",
connector->base.id, connector->base.id,
drm_get_connector_name(connector), connector->name,
drm_get_connector_status_name(connector->status)); drm_get_connector_status_name(connector->status));
if (connector->status == connector_status_connected) { if (connector->status == connector_status_connected) {
struct drm_display_mode *mode = &crtc->mode; struct drm_display_mode *mode = &crtc->mode;
@ -2273,7 +2273,7 @@ static void intel_connector_info(struct seq_file *m,
struct drm_display_mode *mode; struct drm_display_mode *mode;
seq_printf(m, "connector %d: type %s, status: %s\n", seq_printf(m, "connector %d: type %s, status: %s\n",
connector->base.id, drm_get_connector_name(connector), connector->base.id, connector->name,
drm_get_connector_status_name(connector->status)); drm_get_connector_status_name(connector->status));
if (connector->status == connector_status_connected) { if (connector->status == connector_status_connected) {
seq_printf(m, "\tname: %s\n", connector->display_info.name); seq_printf(m, "\tname: %s\n", connector->display_info.name);

Просмотреть файл

@ -1089,7 +1089,7 @@ static bool intel_hpd_irq_event(struct drm_device *dev,
DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %s to %s\n", DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %s to %s\n",
connector->base.id, connector->base.id,
drm_get_connector_name(connector), connector->name,
drm_get_connector_status_name(old_status), drm_get_connector_status_name(old_status),
drm_get_connector_status_name(connector->status)); drm_get_connector_status_name(connector->status));
@ -1134,7 +1134,7 @@ static void i915_hotplug_work_func(struct work_struct *work)
connector->polled == DRM_CONNECTOR_POLL_HPD) { connector->polled == DRM_CONNECTOR_POLL_HPD) {
DRM_INFO("HPD interrupt storm detected on connector %s: " DRM_INFO("HPD interrupt storm detected on connector %s: "
"switching from hotplug detection to polling\n", "switching from hotplug detection to polling\n",
drm_get_connector_name(connector)); connector->name);
dev_priv->hpd_stats[intel_encoder->hpd_pin].hpd_mark = HPD_DISABLED; dev_priv->hpd_stats[intel_encoder->hpd_pin].hpd_mark = HPD_DISABLED;
connector->polled = DRM_CONNECTOR_POLL_CONNECT connector->polled = DRM_CONNECTOR_POLL_CONNECT
| DRM_CONNECTOR_POLL_DISCONNECT; | DRM_CONNECTOR_POLL_DISCONNECT;
@ -1142,7 +1142,7 @@ static void i915_hotplug_work_func(struct work_struct *work)
} }
if (hpd_event_bits & (1 << intel_encoder->hpd_pin)) { if (hpd_event_bits & (1 << intel_encoder->hpd_pin)) {
DRM_DEBUG_KMS("Connector %s (pin %i) received hotplug event.\n", DRM_DEBUG_KMS("Connector %s (pin %i) received hotplug event.\n",
drm_get_connector_name(connector), intel_encoder->hpd_pin); connector->name, intel_encoder->hpd_pin);
} }
} }
/* if there were no outputs to poll, poll was disabled, /* if there were no outputs to poll, poll was disabled,
@ -4321,7 +4321,7 @@ static void intel_hpd_irq_reenable(unsigned long data)
if (intel_connector->encoder->hpd_pin == i) { if (intel_connector->encoder->hpd_pin == i) {
if (connector->polled != intel_connector->polled) if (connector->polled != intel_connector->polled)
DRM_DEBUG_DRIVER("Reenabling HPD on connector %s\n", DRM_DEBUG_DRIVER("Reenabling HPD on connector %s\n",
drm_get_connector_name(connector)); connector->name);
connector->polled = intel_connector->polled; connector->polled = intel_connector->polled;
if (!connector->polled) if (!connector->polled)
connector->polled = DRM_CONNECTOR_POLL_HPD; connector->polled = DRM_CONNECTOR_POLL_HPD;

Просмотреть файл

@ -634,7 +634,7 @@ intel_crt_detect(struct drm_connector *connector, bool force)
intel_runtime_pm_get(dev_priv); intel_runtime_pm_get(dev_priv);
DRM_DEBUG_KMS("[CONNECTOR:%d:%s] force=%d\n", DRM_DEBUG_KMS("[CONNECTOR:%d:%s] force=%d\n",
connector->base.id, drm_get_connector_name(connector), connector->base.id, connector->name,
force); force);
power_domain = intel_display_port_power_domain(intel_encoder); power_domain = intel_display_port_power_domain(intel_encoder);

Просмотреть файл

@ -4929,7 +4929,7 @@ static void intel_connector_check_state(struct intel_connector *connector)
DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
connector->base.base.id, connector->base.base.id,
drm_get_connector_name(&connector->base)); connector->base.name);
WARN(connector->base.dpms == DRM_MODE_DPMS_OFF, WARN(connector->base.dpms == DRM_MODE_DPMS_OFF,
"wrong connector dpms state\n"); "wrong connector dpms state\n");
@ -7853,7 +7853,7 @@ void intel_write_eld(struct drm_encoder *encoder,
DRM_DEBUG_DRIVER("ELD on [CONNECTOR:%d:%s], [ENCODER:%d:%s]\n", DRM_DEBUG_DRIVER("ELD on [CONNECTOR:%d:%s], [ENCODER:%d:%s]\n",
connector->base.id, connector->base.id,
drm_get_connector_name(connector), connector->name,
connector->encoder->base.id, connector->encoder->base.id,
drm_get_encoder_name(connector->encoder)); drm_get_encoder_name(connector->encoder));
@ -8320,7 +8320,7 @@ bool intel_get_load_detect_pipe(struct drm_connector *connector,
int i = -1; int i = -1;
DRM_DEBUG_KMS("[CONNECTOR:%d:%s], [ENCODER:%d:%s]\n", DRM_DEBUG_KMS("[CONNECTOR:%d:%s], [ENCODER:%d:%s]\n",
connector->base.id, drm_get_connector_name(connector), connector->base.id, connector->name,
encoder->base.id, drm_get_encoder_name(encoder)); encoder->base.id, drm_get_encoder_name(encoder));
/* /*
@ -8432,7 +8432,7 @@ void intel_release_load_detect_pipe(struct drm_connector *connector,
struct intel_crtc *intel_crtc = to_intel_crtc(crtc); struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
DRM_DEBUG_KMS("[CONNECTOR:%d:%s], [ENCODER:%d:%s]\n", DRM_DEBUG_KMS("[CONNECTOR:%d:%s], [ENCODER:%d:%s]\n",
connector->base.id, drm_get_connector_name(connector), connector->base.id, connector->name,
encoder->base.id, drm_get_encoder_name(encoder)); encoder->base.id, drm_get_encoder_name(encoder));
if (old->load_detect_temp) { if (old->load_detect_temp) {
@ -9404,7 +9404,7 @@ connected_sink_compute_bpp(struct intel_connector *connector,
DRM_DEBUG_KMS("[CONNECTOR:%d:%s] checking for sink bpp constrains\n", DRM_DEBUG_KMS("[CONNECTOR:%d:%s] checking for sink bpp constrains\n",
connector->base.base.id, connector->base.base.id,
drm_get_connector_name(&connector->base)); connector->base.name);
/* Don't use an invalid EDID bpc value */ /* Don't use an invalid EDID bpc value */
if (connector->base.display_info.bpc && if (connector->base.display_info.bpc &&
@ -10617,7 +10617,7 @@ intel_modeset_stage_output_state(struct drm_device *dev,
DRM_DEBUG_KMS("[CONNECTOR:%d:%s] to [NOCRTC]\n", DRM_DEBUG_KMS("[CONNECTOR:%d:%s] to [NOCRTC]\n",
connector->base.base.id, connector->base.base.id,
drm_get_connector_name(&connector->base)); connector->base.name);
} }
@ -10652,7 +10652,7 @@ intel_modeset_stage_output_state(struct drm_device *dev,
DRM_DEBUG_KMS("[CONNECTOR:%d:%s] to [CRTC:%d]\n", DRM_DEBUG_KMS("[CONNECTOR:%d:%s] to [CRTC:%d]\n",
connector->base.base.id, connector->base.base.id,
drm_get_connector_name(&connector->base), connector->base.name,
new_crtc->base.id); new_crtc->base.id);
} }
@ -12103,7 +12103,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
} }
DRM_DEBUG_KMS("[CONNECTOR:%d:%s] hw state readout: %s\n", DRM_DEBUG_KMS("[CONNECTOR:%d:%s] hw state readout: %s\n",
connector->base.base.id, connector->base.base.id,
drm_get_connector_name(&connector->base), connector->base.name,
connector->base.encoder ? "enabled" : "disabled"); connector->base.encoder ? "enabled" : "disabled");
} }
} }

Просмотреть файл

@ -3453,7 +3453,7 @@ intel_dp_detect(struct drm_connector *connector, bool force)
intel_display_power_get(dev_priv, power_domain); intel_display_power_get(dev_priv, power_domain);
DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
connector->base.id, drm_get_connector_name(connector)); connector->base.id, connector->name);
intel_dp->has_audio = false; intel_dp->has_audio = false;

Просмотреть файл

@ -343,7 +343,7 @@ intel_dvo_detect(struct drm_connector *connector, bool force)
{ {
struct intel_dvo *intel_dvo = intel_attached_dvo(connector); struct intel_dvo *intel_dvo = intel_attached_dvo(connector);
DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
connector->base.id, drm_get_connector_name(connector)); connector->base.id, connector->name);
return intel_dvo->dev.dev_ops->detect(&intel_dvo->dev); return intel_dvo->dev.dev_ops->detect(&intel_dvo->dev);
} }

Просмотреть файл

@ -344,14 +344,14 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
if (!enabled[i]) { if (!enabled[i]) {
DRM_DEBUG_KMS("connector %s not enabled, skipping\n", DRM_DEBUG_KMS("connector %s not enabled, skipping\n",
drm_get_connector_name(connector)); connector->name);
continue; continue;
} }
encoder = connector->encoder; encoder = connector->encoder;
if (!encoder || WARN_ON(!encoder->crtc)) { if (!encoder || WARN_ON(!encoder->crtc)) {
DRM_DEBUG_KMS("connector %s has no encoder or crtc, skipping\n", DRM_DEBUG_KMS("connector %s has no encoder or crtc, skipping\n",
drm_get_connector_name(connector)); connector->name);
enabled[i] = false; enabled[i] = false;
continue; continue;
} }
@ -374,7 +374,7 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
} }
DRM_DEBUG_KMS("looking for cmdline mode on connector %s\n", DRM_DEBUG_KMS("looking for cmdline mode on connector %s\n",
drm_get_connector_name(connector)); connector->name);
/* go for command line mode first */ /* go for command line mode first */
modes[i] = drm_pick_cmdline_mode(fb_conn, width, height); modes[i] = drm_pick_cmdline_mode(fb_conn, width, height);
@ -382,7 +382,7 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
/* try for preferred next */ /* try for preferred next */
if (!modes[i]) { if (!modes[i]) {
DRM_DEBUG_KMS("looking for preferred mode on connector %s\n", DRM_DEBUG_KMS("looking for preferred mode on connector %s\n",
drm_get_connector_name(connector)); connector->name);
modes[i] = drm_has_preferred_mode(fb_conn, width, modes[i] = drm_has_preferred_mode(fb_conn, width,
height); height);
} }
@ -401,7 +401,7 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
* something we own. * something we own.
*/ */
DRM_DEBUG_KMS("looking for current mode on connector %s\n", DRM_DEBUG_KMS("looking for current mode on connector %s\n",
drm_get_connector_name(connector)); connector->name);
intel_mode_from_pipe_config(&encoder->crtc->hwmode, intel_mode_from_pipe_config(&encoder->crtc->hwmode,
&to_intel_crtc(encoder->crtc)->config); &to_intel_crtc(encoder->crtc)->config);
modes[i] = &encoder->crtc->hwmode; modes[i] = &encoder->crtc->hwmode;
@ -409,7 +409,7 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
crtcs[i] = new_crtc; crtcs[i] = new_crtc;
DRM_DEBUG_KMS("connector %s on pipe %d [CRTC:%d]: %dx%d%s\n", DRM_DEBUG_KMS("connector %s on pipe %d [CRTC:%d]: %dx%d%s\n",
drm_get_connector_name(connector), connector->name,
pipe_name(to_intel_crtc(encoder->crtc)->pipe), pipe_name(to_intel_crtc(encoder->crtc)->pipe),
encoder->crtc->base.id, encoder->crtc->base.id,
modes[i]->hdisplay, modes[i]->vdisplay, modes[i]->hdisplay, modes[i]->vdisplay,

Просмотреть файл

@ -973,7 +973,7 @@ intel_hdmi_detect(struct drm_connector *connector, bool force)
enum drm_connector_status status = connector_status_disconnected; enum drm_connector_status status = connector_status_disconnected;
DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
connector->base.id, drm_get_connector_name(connector)); connector->base.id, connector->name);
power_domain = intel_display_port_power_domain(intel_encoder); power_domain = intel_display_port_power_domain(intel_encoder);
intel_display_power_get(dev_priv, power_domain); intel_display_power_get(dev_priv, power_domain);

Просмотреть файл

@ -334,7 +334,7 @@ intel_lvds_detect(struct drm_connector *connector, bool force)
enum drm_connector_status status; enum drm_connector_status status;
DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
connector->base.id, drm_get_connector_name(connector)); connector->base.id, connector->name);
status = intel_panel_detect(dev); status = intel_panel_detect(dev);
if (status != connector_status_unknown) if (status != connector_status_unknown)

Просмотреть файл

@ -1130,7 +1130,7 @@ int intel_panel_setup_backlight(struct drm_connector *connector)
if (ret) { if (ret) {
DRM_DEBUG_KMS("failed to setup backlight for connector %s\n", DRM_DEBUG_KMS("failed to setup backlight for connector %s\n",
drm_get_connector_name(connector)); connector->name);
return ret; return ret;
} }

Просмотреть файл

@ -1743,7 +1743,7 @@ intel_sdvo_detect(struct drm_connector *connector, bool force)
enum drm_connector_status ret; enum drm_connector_status ret;
DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
connector->base.id, drm_get_connector_name(connector)); connector->base.id, connector->name);
if (!intel_sdvo_get_value(intel_sdvo, if (!intel_sdvo_get_value(intel_sdvo,
SDVO_CMD_GET_ATTACHED_DISPLAYS, SDVO_CMD_GET_ATTACHED_DISPLAYS,
@ -1805,7 +1805,7 @@ static void intel_sdvo_get_ddc_modes(struct drm_connector *connector)
struct edid *edid; struct edid *edid;
DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
connector->base.id, drm_get_connector_name(connector)); connector->base.id, connector->name);
/* set the bus switch and get the modes */ /* set the bus switch and get the modes */
edid = intel_sdvo_get_edid(connector); edid = intel_sdvo_get_edid(connector);
@ -1903,7 +1903,7 @@ static void intel_sdvo_get_tv_modes(struct drm_connector *connector)
int i; int i;
DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
connector->base.id, drm_get_connector_name(connector)); connector->base.id, connector->name);
/* Read the list of supported input resolutions for the selected TV /* Read the list of supported input resolutions for the selected TV
* format. * format.
@ -1940,7 +1940,7 @@ static void intel_sdvo_get_lvds_modes(struct drm_connector *connector)
struct drm_display_mode *newmode; struct drm_display_mode *newmode;
DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
connector->base.id, drm_get_connector_name(connector)); connector->base.id, connector->name);
/* /*
* Fetch modes from VBT. For SDVO prefer the VBT mode since some * Fetch modes from VBT. For SDVO prefer the VBT mode since some

Просмотреть файл

@ -1314,7 +1314,7 @@ intel_tv_detect(struct drm_connector *connector, bool force)
int type; int type;
DRM_DEBUG_KMS("[CONNECTOR:%d:%s] force=%d\n", DRM_DEBUG_KMS("[CONNECTOR:%d:%s] force=%d\n",
connector->base.id, drm_get_connector_name(connector), connector->base.id, connector->name,
force); force);
mode = reported_modes[0]; mode = reported_modes[0];