Merge branch 'parisc-4.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller...
[cascardo/linux.git] / drivers / gpu / drm / drm_fb_helper.c
index e03f8ad..7c2eb75 100644 (file)
@@ -1968,7 +1968,6 @@ static int drm_pick_crtcs(struct drm_fb_helper *fb_helper,
                          int n, int width, int height)
 {
        int c, o;
-       struct drm_device *dev = fb_helper->dev;
        struct drm_connector *connector;
        const struct drm_connector_helper_funcs *connector_funcs;
        struct drm_encoder *encoder;
@@ -1987,7 +1986,7 @@ static int drm_pick_crtcs(struct drm_fb_helper *fb_helper,
        if (modes[n] == NULL)
                return best_score;
 
-       crtcs = kzalloc(dev->mode_config.num_connector *
+       crtcs = kzalloc(fb_helper->connector_count *
                        sizeof(struct drm_fb_helper_crtc *), GFP_KERNEL);
        if (!crtcs)
                return best_score;
@@ -2033,7 +2032,7 @@ static int drm_pick_crtcs(struct drm_fb_helper *fb_helper,
                if (score > best_score) {
                        best_score = score;
                        memcpy(best_crtcs, crtcs,
-                              dev->mode_config.num_connector *
+                              fb_helper->connector_count *
                               sizeof(struct drm_fb_helper_crtc *));
                }
        }