]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
drm/radeon/audio: break out of loops once we match connector
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 10 Oct 2013 21:58:27 +0000 (17:58 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 1 Nov 2013 16:43:19 +0000 (12:43 -0400)
No need to continue with the loops once we've matched
the appropriate connector.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/evergreen_hdmi.c
drivers/gpu/drm/radeon/r600_hdmi.c

index f71ce390aebe581dd08998ce29d98e4b1058155c..5fbe48647ea4d07c07f61eeb2f0958f1e1ddf210 100644 (file)
@@ -68,8 +68,10 @@ static void dce4_afmt_write_speaker_allocation(struct drm_encoder *encoder)
        int sad_count;
 
        list_for_each_entry(connector, &encoder->dev->mode_config.connector_list, head) {
-               if (connector->encoder == encoder)
+               if (connector->encoder == encoder) {
                        radeon_connector = to_radeon_connector(connector);
+                       break;
+               }
        }
 
        if (!radeon_connector) {
@@ -121,8 +123,10 @@ static void evergreen_hdmi_write_sad_regs(struct drm_encoder *encoder)
        };
 
        list_for_each_entry(connector, &encoder->dev->mode_config.connector_list, head) {
-               if (connector->encoder == encoder)
+               if (connector->encoder == encoder) {
                        radeon_connector = to_radeon_connector(connector);
+                       break;
+               }
        }
 
        if (!radeon_connector) {
index b0fa6002af3e98da440cbebfa1ae183163e8b07d..21f2b74e20e65bea4db4ec571437e43c737300ca 100644 (file)
@@ -303,8 +303,10 @@ static void dce3_2_afmt_write_speaker_allocation(struct drm_encoder *encoder)
        int sad_count;
 
        list_for_each_entry(connector, &encoder->dev->mode_config.connector_list, head) {
-               if (connector->encoder == encoder)
+               if (connector->encoder == encoder) {
                        radeon_connector = to_radeon_connector(connector);
+                       break;
+               }
        }
 
        if (!radeon_connector) {
@@ -356,8 +358,10 @@ static void dce3_2_afmt_write_sad_regs(struct drm_encoder *encoder)
        };
 
        list_for_each_entry(connector, &encoder->dev->mode_config.connector_list, head) {
-               if (connector->encoder == encoder)
+               if (connector->encoder == encoder) {
                        radeon_connector = to_radeon_connector(connector);
+                       break;
+               }
        }
 
        if (!radeon_connector) {