Commit 2babdc85 authored by Daniel Vetter's avatar Daniel Vetter

drm/radeon|amdgpu: Remove redundant num_connectors check

The list walk will shortcircuit anyway.

Cc: Alex Deucher <alexdeucher@gmail.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161213230814.19598-4-daniel.vetter@ffwll.ch
parent 5bc9cb4d
...@@ -61,10 +61,8 @@ static void amdgpu_hotplug_work_func(struct work_struct *work) ...@@ -61,10 +61,8 @@ static void amdgpu_hotplug_work_func(struct work_struct *work)
struct drm_connector *connector; struct drm_connector *connector;
mutex_lock(&mode_config->mutex); mutex_lock(&mode_config->mutex);
if (mode_config->num_connector) {
list_for_each_entry(connector, &mode_config->connector_list, head) list_for_each_entry(connector, &mode_config->connector_list, head)
amdgpu_connector_hotplug(connector); amdgpu_connector_hotplug(connector);
}
mutex_unlock(&mode_config->mutex); mutex_unlock(&mode_config->mutex);
/* Just fire off a uevent and let userspace tell us what to do */ /* Just fire off a uevent and let userspace tell us what to do */
drm_helper_hpd_irq_event(dev); drm_helper_hpd_irq_event(dev);
......
...@@ -85,10 +85,8 @@ static void radeon_hotplug_work_func(struct work_struct *work) ...@@ -85,10 +85,8 @@ static void radeon_hotplug_work_func(struct work_struct *work)
return; return;
mutex_lock(&mode_config->mutex); mutex_lock(&mode_config->mutex);
if (mode_config->num_connector) {
list_for_each_entry(connector, &mode_config->connector_list, head) list_for_each_entry(connector, &mode_config->connector_list, head)
radeon_connector_hotplug(connector); radeon_connector_hotplug(connector);
}
mutex_unlock(&mode_config->mutex); mutex_unlock(&mode_config->mutex);
/* Just fire off a uevent and let userspace tell us what to do */ /* Just fire off a uevent and let userspace tell us what to do */
drm_helper_hpd_irq_event(dev); drm_helper_hpd_irq_event(dev);
...@@ -103,10 +101,8 @@ static void radeon_dp_work_func(struct work_struct *work) ...@@ -103,10 +101,8 @@ static void radeon_dp_work_func(struct work_struct *work)
struct drm_connector *connector; struct drm_connector *connector;
/* this should take a mutex */ /* this should take a mutex */
if (mode_config->num_connector) {
list_for_each_entry(connector, &mode_config->connector_list, head) list_for_each_entry(connector, &mode_config->connector_list, head)
radeon_connector_hotplug(connector); radeon_connector_hotplug(connector);
}
} }
/** /**
* radeon_driver_irq_preinstall_kms - drm irq preinstall callback * radeon_driver_irq_preinstall_kms - drm irq preinstall callback
......
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