drm: omapdrm: Refactor CRTC creation code

Create a omap_modeset_create_crtc() function to avoid duplicating plane
and CRTC creation code.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Laurent Pinchart
2015-01-11 16:30:44 +02:00
parent 222025e42d
commit fb9a35f89f
2 changed files with 45 additions and 33 deletions

View File

@@ -393,7 +393,7 @@ struct drm_plane *omap_plane_init(struct drm_device *dev,
omap_plane = kzalloc(sizeof(*omap_plane), GFP_KERNEL);
if (!omap_plane)
return NULL;
return ERR_PTR(-ENOMEM);
drm_flip_work_init(&omap_plane->unpin_work,
"unpin", unpin_worker);