drm/radeon/ss: use num_crtc rather than hardcoded 6
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 21 Aug 2012 22:52:56 +0000 (18:52 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 21 Aug 2012 22:52:56 +0000 (18:52 -0400)
When checking if a pll is in use.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/radeon/atombios_crtc.c

index cb18813..f4d4505 100644 (file)
@@ -452,7 +452,7 @@ static void atombios_crtc_program_ss(struct radeon_device *rdev,
        union atom_enable_ss args;
 
        if (!enable) {
-               for (i = 0; i < 6; i++) {
+               for (i = 0; i < rdev->num_crtc; i++) {
                        if (rdev->mode_info.crtcs[i] &&
                            rdev->mode_info.crtcs[i]->enabled &&
                            i != crtc_id &&