TTY: move allocations to tty_alloc_driver
[deliverable/linux.git] / drivers / gpu / drm / drm_fb_helper.c
index 5683b7fdd7466a16a5d1c4df0477c734fed7b0d4..f546d1e8af82f10e1cfe1d9c6c66ec9015bc1a68 100644 (file)
@@ -228,7 +228,7 @@ bool drm_fb_helper_restore_fbdev_mode(struct drm_fb_helper *fb_helper)
        int i, ret;
        for (i = 0; i < fb_helper->crtc_count; i++) {
                struct drm_mode_set *mode_set = &fb_helper->crtc_info[i].mode_set;
-               ret = drm_crtc_helper_set_config(mode_set);
+               ret = mode_set->crtc->funcs->set_config(mode_set);
                if (ret)
                        error = true;
        }
@@ -1353,7 +1353,7 @@ int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper)
        struct drm_device *dev = fb_helper->dev;
        int count = 0;
        u32 max_width, max_height, bpp_sel;
-       bool bound = false, crtcs_bound = false;
+       int bound = 0, crtcs_bound = 0;
        struct drm_crtc *crtc;
 
        if (!fb_helper->fb)
@@ -1362,12 +1362,12 @@ int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper)
        mutex_lock(&dev->mode_config.mutex);
        list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
                if (crtc->fb)
-                       crtcs_bound = true;
+                       crtcs_bound++;
                if (crtc->fb == fb_helper->fb)
-                       bound = true;
+                       bound++;
        }
 
-       if (!bound && crtcs_bound) {
+       if (bound < crtcs_bound) {
                fb_helper->delayed_hotplug = true;
                mutex_unlock(&dev->mode_config.mutex);
                return 0;
This page took 0.024679 seconds and 5 git commands to generate.