aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2013-12-17 14:10:47 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-05 14:59:50 -0500
commit020a9ea7c2206be4382a09cbafc7c3bdf5bbf8a5 (patch)
tree1c67184c43ff1ddea71a0e2f6d8127b2ca94fa80
parentb5ea14924718864d64f4cb12a6d901ffeb2972ad (diff)
imx-drm: imx-drm-core: avoid going the long route round for drm_device
We have the drm_device available, so rather than storing it and then using the stored version, us the one we already have available to us. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Shawn Guo <shawn.guo@linaro.org> Tested-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/imx-drm/imx-drm-core.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c
index 830f76f5d9bd..87d08f4be8d3 100644
--- a/drivers/staging/imx-drm/imx-drm-core.c
+++ b/drivers/staging/imx-drm/imx-drm-core.c
@@ -88,9 +88,9 @@ static int imx_drm_driver_unload(struct drm_device *drm)
88 88
89 imx_drm_device_put(); 89 imx_drm_device_put();
90 90
91 drm_vblank_cleanup(imxdrm->drm); 91 drm_vblank_cleanup(drm);
92 drm_kms_helper_poll_fini(imxdrm->drm); 92 drm_kms_helper_poll_fini(drm);
93 drm_mode_config_cleanup(imxdrm->drm); 93 drm_mode_config_cleanup(drm);
94 94
95 return 0; 95 return 0;
96} 96}
@@ -424,15 +424,15 @@ static int imx_drm_driver_load(struct drm_device *drm, unsigned long flags)
424 424
425 mutex_lock(&imxdrm->mutex); 425 mutex_lock(&imxdrm->mutex);
426 426
427 drm_kms_helper_poll_init(imxdrm->drm); 427 drm_kms_helper_poll_init(drm);
428 428
429 /* setup the grouping for the legacy output */ 429 /* setup the grouping for the legacy output */
430 ret = drm_mode_group_init_legacy_group(imxdrm->drm, 430 ret = drm_mode_group_init_legacy_group(drm,
431 &imxdrm->drm->primary->mode_group); 431 &drm->primary->mode_group);
432 if (ret) 432 if (ret)
433 goto err_kms; 433 goto err_kms;
434 434
435 ret = drm_vblank_init(imxdrm->drm, MAX_CRTC); 435 ret = drm_vblank_init(drm, MAX_CRTC);
436 if (ret) 436 if (ret)
437 goto err_kms; 437 goto err_kms;
438 438
@@ -441,7 +441,7 @@ static int imx_drm_driver_load(struct drm_device *drm, unsigned long flags)
441 * by drm timer once a current process gives up ownership of 441 * by drm timer once a current process gives up ownership of
442 * vblank event.(after drm_vblank_put function is called) 442 * vblank event.(after drm_vblank_put function is called)
443 */ 443 */
444 imxdrm->drm->vblank_disable_allowed = true; 444 drm->vblank_disable_allowed = true;
445 445
446 if (!imx_drm_device_get()) { 446 if (!imx_drm_device_get()) {
447 ret = -EINVAL; 447 ret = -EINVAL;