Merge tag 'tty-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
[cascardo/linux.git] / drivers / gpu / drm / drm_plane_helper.c
index b62b036..40c1db9 100644 (file)
@@ -353,13 +353,14 @@ static struct drm_plane *create_primary_plane(struct drm_device *dev)
        if (primary == NULL) {
                DRM_DEBUG_KMS("Failed to allocate primary plane\n");
                return NULL;
-               /*
-                * Remove the format_default field from drm_plane when dropping
-                * this helper.
-                */
-               primary->format_default = true;
        }
 
+       /*
+        * Remove the format_default field from drm_plane when dropping
+        * this helper.
+        */
+       primary->format_default = true;
+
        /* possible_crtc's will be filled in later by crtc_init */
        ret = drm_universal_plane_init(dev, primary, 0,
                                       &drm_primary_helper_funcs,
@@ -400,9 +401,9 @@ int drm_plane_helper_commit(struct drm_plane *plane,
                            struct drm_plane_state *plane_state,
                            struct drm_framebuffer *old_fb)
 {
-       struct drm_plane_helper_funcs *plane_funcs;
+       const struct drm_plane_helper_funcs *plane_funcs;
        struct drm_crtc *crtc[2];
-       struct drm_crtc_helper_funcs *crtc_funcs[2];
+       const struct drm_crtc_helper_funcs *crtc_funcs[2];
        int i, ret = 0;
 
        plane_funcs = plane->helper_private;